Soenneker.Enums.UnitOfTime
4.0.633
Prefix Reserved
dotnet add package Soenneker.Enums.UnitOfTime --version 4.0.633
NuGet\Install-Package Soenneker.Enums.UnitOfTime -Version 4.0.633
<PackageReference Include="Soenneker.Enums.UnitOfTime" Version="4.0.633" />
<PackageVersion Include="Soenneker.Enums.UnitOfTime" Version="4.0.633" />
<PackageReference Include="Soenneker.Enums.UnitOfTime" />
paket add Soenneker.Enums.UnitOfTime --version 4.0.633
#r "nuget: Soenneker.Enums.UnitOfTime, 4.0.633"
#:package Soenneker.Enums.UnitOfTime@4.0.633
#addin nuget:?package=Soenneker.Enums.UnitOfTime&version=4.0.633
#tool nuget:?package=Soenneker.Enums.UnitOfTime&version=4.0.633
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 | 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.Attributes.PublicOpenApiObject (>= 4.0.64)
- Soenneker.Gen.EnumValues (>= 4.0.64)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Soenneker.Enums.UnitOfTime:
| Package | Downloads |
|---|---|
|
Soenneker.Extensions.DateTime
A collection of helpful DateTime extension methods |
|
|
Soenneker.Extensions.DateRangeType
A collection of helpful DateRangeType enum 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 |
|---|---|---|
| 4.0.633 | 105 | 10/15/2026 |
| 4.0.632 | 114 | 10/14/2026 |
| 4.0.631 | 295 | 10/14/2026 |
| 4.0.629 | 37 | 10/14/2026 |
| 4.0.628 | 33 | 10/14/2026 |
| 4.0.626 | 62 | 10/14/2026 |
| 4.0.625 | 253 | 10/13/2026 |
| 4.0.621 | 80 | 10/13/2026 |
| 4.0.620 | 105 | 10/12/2026 |
| 4.0.618 | 538 | 10/12/2026 |
| 4.0.617 | 1,110 | 10/11/2026 |
| 4.0.615 | 550 | 10/11/2026 |
| 4.0.614 | 2,127 | 9/30/2026 |
| 4.0.613 | 1,512 | 9/25/2026 |
| 4.0.612 | 106 | 9/24/2026 |
| 4.0.611 | 101 | 9/24/2026 |
| 4.0.610 | 3,394 | 9/15/2026 |
| 4.0.609 | 109 | 9/15/2026 |
| 4.0.608 | 103 | 9/15/2026 |
| 4.0.607 | 3,936 | 9/12/2026 |
Updated Multiple NuGet packages