Soenneker.Enums.UnitOfTime 11.0.643

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

A string-backed enum-value type for carrying a duration or calendar-period unit through application and API contracts.

Install

dotnet add package Soenneker.Enums.UnitOfTime

Usage

using Soenneker.Enums.UnitOfTime;

UnitOfTime unit = UnitOfTime.Minute;
string wireValue = unit.Value; // "Minute"

if (UnitOfTime.TryFromValue(input, out UnitOfTime? parsed))
{
    unit = parsed;
}

Available values:

  • Subsecond: Tick (100 nanoseconds), Nanosecond, Microsecond, Millisecond
  • Clock units: Second, Minute, Hour
  • Larger periods: Day, Week, Month, Quarter, Year, Decade

System.Text.Json serializes the type as the shown string value and restores recognized values to the shared static instances. FromValue throws for unknown input; use TryFromValue when parsing configuration or requests. FromName and TryFromName are also generated.

This package identifies a unit; it does not convert values, calculate a duration, or apply calendar arithmetic. Months, quarters, years, and decades vary by reference date, while a calendar day can differ from 24 elapsed hours across time-zone transitions. The consuming API must state whether Day and Week mean fixed elapsed durations or calendar periods, define its time zone, and use a numeric type with sufficient range and precision.

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 (2)

Showing the top 2 NuGet packages that depend on Soenneker.Enums.UnitOfTime:

Package Downloads
Soenneker.Extensions.DateTime

A collection of helpful DateTime extension methods

Soenneker.Extensions.DateTimeOffsets

A collection of helpful DateTimeOffset extension methods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.643 773 11/19/2026
11.0.642 636 11/18/2026
11.0.641 1,503 11/14/2026
11.0.640 1,375 11/11/2026
11.0.639 106 11/11/2026
11.0.638 96 11/11/2026
11.0.637 4,105 10/26/2026
11.0.636 319 10/26/2026
11.0.635 114 10/26/2026
11.0.634 282 10/26/2026
4.0.633 2,237 10/15/2026
4.0.632 325 10/14/2026
4.0.631 741 10/14/2026
4.0.629 113 10/14/2026
4.0.628 105 10/14/2026
4.0.626 125 10/14/2026
4.0.625 510 10/13/2026
4.0.621 124 10/13/2026
4.0.620 136 10/12/2026
4.0.618 773 10/12/2026
Loading failed

Updated Multiple NuGet packages