Soenneker.Extensions.DateRangeType 11.0.814

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.DateRangeType --version 11.0.814
                    
NuGet\Install-Package Soenneker.Extensions.DateRangeType -Version 11.0.814
                    
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="Soenneker.Extensions.DateRangeType" Version="11.0.814" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.DateRangeType" Version="11.0.814" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.DateRangeType" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.DateRangeType --version 11.0.814
                    
#r "nuget: Soenneker.Extensions.DateRangeType, 11.0.814"
                    
#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.
#:package Soenneker.Extensions.DateRangeType@11.0.814
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.DateRangeType&version=11.0.814
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.DateRangeType&version=11.0.814
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.DateRangeType

Converts Soenneker.Enums.DateRangeType.DateRangeType presets into UTC date boundaries using a supplied time zone.

Installation

dotnet add package Soenneker.Extensions.DateRangeType

Resolve a preset

using Soenneker.Enums.DateRangeType;
using Soenneker.Extensions.DateRangeType;

TimeZoneInfo timeZone = TimeZoneInfo.FindSystemTimeZoneById("America/New_York");

(DateTimeOffset? startAt, DateTimeOffset? endAt) =
    DateRangeType.CurrentMonth.GetDateTimesFromRange(timeZone);

Both non-null results are UTC instants. The supplied time zone determines the local calendar boundary before that boundary is converted to UTC, so offsets remain correct across daylight-saving transitions.

Range behavior

Preset Start End
Today Start of the current local day Time of the call
Yesterday Start of the previous local day Last tick of the previous local day
CurrentWeek Start of the current local week Time of the call
PreviousWeek Start of the previous local week Last tick of the previous local week
CurrentMonth Start of the current local month Time of the call
PreviousMonth Start of the previous local month Last tick of the previous local month
CurrentYear Start of the current local year Time of the call
PreviousYear Start of the previous local year Last tick of the previous local year
Custom or an unsupported value null null

Weeks begin on Monday. Current ranges use DateTimeOffset.UtcNow captured during the call; the API does not accept an external clock or custom endpoint.

Unit mapping

UnitOfTime unit = DateRangeType.Today.ToUnitOfTime();

Today and Yesterday map to UnitOfTime.Hour. Every other value maps to UnitOfTime.Second, including Custom.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.820 99 11/3/2026
11.0.818 46 11/3/2026
11.0.817 74 11/3/2026
11.0.816 71 11/3/2026
11.0.815 72 11/3/2026
11.0.814 83 11/3/2026
11.0.813 89 11/2/2026
11.0.812 118 10/27/2026
11.0.811 100 10/27/2026
11.0.810 104 10/27/2026
11.0.809 101 10/27/2026
11.0.808 98 10/26/2026
11.0.805 94 10/26/2026
11.0.804 95 10/26/2026
11.0.803 92 10/26/2026
11.0.802 91 10/26/2026
11.0.801 91 10/26/2026
11.0.800 86 10/26/2026
11.0.799 99 10/26/2026
4.0.798 526 10/15/2026
Loading failed

Updated Multiple NuGet packages