Soenneker.Enums.DateRangeType 4.0.160

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Enums.DateRangeType --version 4.0.160
                    
NuGet\Install-Package Soenneker.Enums.DateRangeType -Version 4.0.160
                    
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.Enums.DateRangeType" Version="4.0.160" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Enums.DateRangeType" Version="4.0.160" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Enums.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.Enums.DateRangeType --version 4.0.160
                    
#r "nuget: Soenneker.Enums.DateRangeType, 4.0.160"
                    
#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.Enums.DateRangeType@4.0.160
                    
#: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.Enums.DateRangeType&version=4.0.160
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Enums.DateRangeType&version=4.0.160
                    
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

Soenneker.Enums.DateRangeType

A string-backed enum-value type for selecting a predefined calendar period or a caller-supplied custom date range.

Install

dotnet add package Soenneker.Enums.DateRangeType

Usage

using Soenneker.Enums.DateRangeType;

DateRangeType selection = DateRangeType.PreviousMonth;
string wireValue = selection.Value; // "PreviousMonth"

if (DateRangeType.TryFromValue(input, out DateRangeType? parsed))
{
    // Resolve parsed to boundaries using your application's calendar rules
}

Available values:

  • Today
  • Yesterday
  • CurrentWeek
  • PreviousWeek
  • CurrentMonth
  • PreviousMonth
  • CurrentYear
  • PreviousYear
  • Custom

System.Text.Json serializes the type as the shown string value. FromValue throws for unknown input; use TryFromValue for request values. FromName and TryFromName are also generated for member-name lookup.

This package identifies a range selection; it does not calculate start or end timestamps. The consuming application must define its time zone, first day of the week, inclusive/exclusive boundary policy, and the explicit boundaries required by Custom. Capture the reference time once before resolving relative selections so a request cannot cross a calendar boundary midway through calculation.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Enums.DateRangeType:

Package Downloads
Soenneker.Extensions.DateRangeType

A collection of helpful DateRangeType enum extension methods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.163 125 9/30/2026
4.0.162 131 9/25/2026
4.0.161 89 9/24/2026
4.0.160 80 9/24/2026
4.0.159 429 9/15/2026
4.0.158 96 9/15/2026
4.0.156 259 9/12/2026
4.0.155 108 9/12/2026
4.0.154 106 9/12/2026
4.0.153 308 9/7/2026
4.0.152 227 9/4/2026
4.0.151 254 8/30/2026
4.0.150 142 8/30/2026
4.0.149 127 8/30/2026
4.0.146 545 8/21/2026
4.0.145 348 8/18/2026
4.0.144 118 8/18/2026
4.0.143 132 8/18/2026
4.0.142 344 8/7/2026
4.0.141 406 7/28/2026
Loading failed

Enable Native AOT compatibility analysis