N1CCK.DateMath 1.0.1

dotnet add package N1CCK.DateMath --version 1.0.1
NuGet\Install-Package N1CCK.DateMath -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="N1CCK.DateMath" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add N1CCK.DateMath --version 1.0.1
#r "nuget: N1CCK.DateMath, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install N1CCK.DateMath as a Cake Addin
#addin nuget:?package=N1CCK.DateMath&version=1.0.1

// Install N1CCK.DateMath as a Cake Tool
#tool nuget:?package=N1CCK.DateMath&version=1.0.1

N1CCK.DateMath Library

Overview

The N1CCK.DateMath library is a C# static class that provides functions for calculating start and end dates based on various reporting time periods. These functions are useful for generating date ranges for reporting and data analysis purposes.

Installation

You can include the N1CCK.DateMath library in your C# project by adding the appropriate reference to your project.

Usage

To use the N1CCK.DateMath library, you should include the N1CCK.DateMath namespace in your C# code and use the DateFunctions class.

Here's an example of how to use the GetStartDate and GetEndDate functions:

using N1CCK.DateMath;

// Define a reporting time period and reference date
ReportingTimePeriods timePeriod = ReportingTimePeriods.ThisMonthToDate;
DateTime referenceDate = DateTime.Now;

// Get the start and end dates for the specified time period
DateTime startDate = DateFunctions.GetStartDate(timePeriod, referenceDate);
DateTime endDate = DateFunctions.GetEndDate(timePeriod, referenceDate);

// Use the startDate and endDate in your application

Reporting Time Periods

The ReportingTimePeriods enum represents different reporting time periods, such as "Today," "This Month," "Last Quarter," etc. You can use these values as parameters when calling the GetStartDate and GetEndDate functions. Supported Time Periods

The DateFunctions class supports the following reporting time periods:

Today
Yesterday
This Week To Date
Last Week To Date
Last Week (Full)
This Month To Date
This Month Last Year To Date
This Month Last Year (Full)
Last Month To Date
Last Month (Full)
This Quarter To Date
Last Quarter (Full)
This Quarter Last Year (Full)
This Quarter Last Year To Date
Last Quarter Last Year (Full)
This Year To Date
Last Year To Date
Last Year (Full)

License

This library is provided under the MIT license. You can find the license information in the LICENSE file.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on N1CCK.DateMath:

Package Downloads
ExamTools

ExamTools API wrapper - Note - the ExamTools internal API is undocumented and unsupported. It is not intended for external uses. Use this helper class at your own risk.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 231 12/6/2023
1.0.0 127 11/8/2023