Soenneker.Extensions.DateRangeType
4.0.733
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.DateRangeType --version 4.0.733
NuGet\Install-Package Soenneker.Extensions.DateRangeType -Version 4.0.733
<PackageReference Include="Soenneker.Extensions.DateRangeType" Version="4.0.733" />
<PackageVersion Include="Soenneker.Extensions.DateRangeType" Version="4.0.733" />
<PackageReference Include="Soenneker.Extensions.DateRangeType" />
paket add Soenneker.Extensions.DateRangeType --version 4.0.733
#r "nuget: Soenneker.Extensions.DateRangeType, 4.0.733"
#:package Soenneker.Extensions.DateRangeType@4.0.733
#addin nuget:?package=Soenneker.Extensions.DateRangeType&version=4.0.733
#tool nuget:?package=Soenneker.Extensions.DateRangeType&version=4.0.733
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 | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.Enums.DateRangeType (>= 4.0.156)
- Soenneker.Extensions.DateTimeOffsets.Suite (>= 4.0.502)
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 |
|---|---|---|
| 4.0.739 | 0 | 9/13/2026 |
| 4.0.738 | 30 | 9/13/2026 |
| 4.0.737 | 34 | 9/13/2026 |
| 4.0.736 | 32 | 9/12/2026 |
| 4.0.735 | 39 | 9/12/2026 |
| 4.0.734 | 38 | 9/12/2026 |
| 4.0.733 | 43 | 9/12/2026 |
| 4.0.732 | 41 | 9/12/2026 |
| 4.0.731 | 41 | 9/12/2026 |
| 4.0.730 | 38 | 9/12/2026 |
| 4.0.729 | 61 | 9/10/2026 |
| 4.0.728 | 48 | 9/10/2026 |
| 4.0.727 | 62 | 9/10/2026 |
| 4.0.726 | 70 | 9/8/2026 |
| 4.0.725 | 48 | 9/8/2026 |
| 4.0.724 | 47 | 9/8/2026 |
| 4.0.723 | 47 | 9/8/2026 |
| 4.0.722 | 75 | 9/8/2026 |
| 4.0.721 | 80 | 9/8/2026 |
| 4.0.719 | 94 | 9/7/2026 |
Update dependency Soenneker.Extensions.DateTimeOffsets.Suite to 4.0.500 (#1305)