Soenneker.Extensions.DateRangeType
11.0.865
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.DateRangeType --version 11.0.865
NuGet\Install-Package Soenneker.Extensions.DateRangeType -Version 11.0.865
<PackageReference Include="Soenneker.Extensions.DateRangeType" Version="11.0.865" />
<PackageVersion Include="Soenneker.Extensions.DateRangeType" Version="11.0.865" />
<PackageReference Include="Soenneker.Extensions.DateRangeType" />
paket add Soenneker.Extensions.DateRangeType --version 11.0.865
#r "nuget: Soenneker.Extensions.DateRangeType, 11.0.865"
#:package Soenneker.Extensions.DateRangeType@11.0.865
#addin nuget:?package=Soenneker.Extensions.DateRangeType&version=11.0.865
#tool nuget:?package=Soenneker.Extensions.DateRangeType&version=11.0.865
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Enums.DateRangeType (>= 11.0.197)
- Soenneker.Extensions.DateTimeOffsets.Days (>= 11.0.215)
- Soenneker.Extensions.DateTimeOffsets.Months (>= 11.0.187)
- Soenneker.Extensions.DateTimeOffsets.Weeks (>= 11.0.181)
- Soenneker.Extensions.DateTimeOffsets.Years (>= 11.0.170)
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.873 | 0 | 12/2/2026 |
| 11.0.872 | 0 | 12/2/2026 |
| 11.0.871 | 0 | 12/2/2026 |
| 11.0.870 | 0 | 12/2/2026 |
| 11.0.869 | 39 | 12/1/2026 |
| 11.0.868 | 43 | 12/1/2026 |
| 11.0.867 | 73 | 12/1/2026 |
| 11.0.866 | 66 | 12/1/2026 |
| 11.0.865 | 61 | 12/1/2026 |
| 11.0.864 | 68 | 12/1/2026 |
| 11.0.863 | 78 | 12/1/2026 |
| 11.0.862 | 85 | 12/1/2026 |
| 11.0.861 | 84 | 11/30/2026 |
| 11.0.860 | 84 | 11/30/2026 |
| 11.0.859 | 92 | 11/30/2026 |
| 11.0.858 | 91 | 11/30/2026 |
| 11.0.857 | 107 | 11/19/2026 |
| 11.0.856 | 91 | 11/19/2026 |
| 11.0.855 | 89 | 11/19/2026 |
| 11.0.854 | 92 | 11/19/2026 |
Update dependency Soenneker.Extensions.DateTimeOffsets.Days to 11.0.215 (#1464)