EndOfDayTime.Core
1.0.0
dotnet add package EndOfDayTime.Core --version 1.0.0
NuGet\Install-Package EndOfDayTime.Core -Version 1.0.0
<PackageReference Include="EndOfDayTime.Core" Version="1.0.0" />
<PackageVersion Include="EndOfDayTime.Core" Version="1.0.0" />
<PackageReference Include="EndOfDayTime.Core" />
paket add EndOfDayTime.Core --version 1.0.0
#r "nuget: EndOfDayTime.Core, 1.0.0"
#:package EndOfDayTime.Core@1.0.0
#addin nuget:?package=EndOfDayTime.Core&version=1.0.0
#tool nuget:?package=EndOfDayTime.Core&version=1.0.0
EndOfDayTime.Core
A .NET value type that represents a time of day in the range 00:00–24:00, where 24:00 denotes end-of-day midnight — distinct from 00:00 (start of day).
This concept is defined in ISO 8601 and commonly used in shift scheduling, timesheet applications, broadcasting, and railway timetables.
Installation
dotnet add package EndOfDayTime.Core
Usage
Creating values
var start = new EndOfDayTime(9, 0); // 09:00
var end = new EndOfDayTime(24, 0); // 24:00 — end of day
var eod = EndOfDayTime.EndOfDay; // 24:00 — static shorthand
Parsing
var t = EndOfDayTime.Parse("24:00");
if (EndOfDayTime.TryParse("17:30", out var result))
Console.WriteLine(result); // 17:30
Formatting
var t = new EndOfDayTime(9, 5);
Console.WriteLine(t); // "09:05"
Comparison and arithmetic
var start = new EndOfDayTime(9, 0);
var end = new EndOfDayTime(24, 0);
TimeSpan duration = end - start; // 15 hours
bool isLast = end > start; // true
bool isEod = end.IsEndOfDay; // true
JSON serialization (System.Text.Json)
var options = new JsonSerializerOptions();
options.Converters.Add(new EndOfDayTimeJsonConverter());
string json = JsonSerializer.Serialize(new EndOfDayTime(24, 0), options); // "24:00"
var parsed = JsonSerializer.Deserialize<EndOfDayTime>("\"09:30\"", options);
WPF / WinForms / ASP.NET model binding
The TypeConverter is registered automatically via [TypeConverter] attribute — no configuration needed:
<local:EndOfDayTimeTextBox TimeValue="{Binding ShiftEnd}" />
// ASP.NET Core model binding
public class ShiftDto
{
public EndOfDayTime End { get; set; } // "24:00" in JSON binds automatically
}
Notes
24:00and00:00are distinct values — the former is end of day, the latter is start of day.24:01and beyond are invalid and will throwArgumentOutOfRangeException.- The internal representation is a
short(total minutes, 0–1440), making it allocation-free.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 10.0.8)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on EndOfDayTime.Core:
| Package | Downloads |
|---|---|
|
EndOfDayTime.WebForms
A .NET type representing times in the range 00:00–24:00, including end-of-day midnight (24:00). Integrations available for WinForms, WPF, Blazor, ASP.NET, Entity Framework Core, and WebForms. |
|
|
EndOfDayTime.Wpf
A .NET type representing times in the range 00:00–24:00, including end-of-day midnight (24:00). Integrations available for WinForms, WPF, Blazor, ASP.NET, Entity Framework Core, and WebForms. |
|
|
EndOfDayTime.Blazor
A .NET type representing times in the range 00:00–24:00, including end-of-day midnight (24:00). Integrations available for WinForms, WPF, Blazor, ASP.NET, Entity Framework Core, and WebForms. |
|
|
EndOfDayTime.EntityFramework
A .NET type representing times in the range 00:00–24:00, including end-of-day midnight (24:00). Integrations available for WinForms, WPF, Blazor, ASP.NET, Entity Framework Core, and WebForms. |
|
|
EndOfDayTime.AspNet
A .NET type representing times in the range 00:00–24:00, including end-of-day midnight (24:00). Integrations available for WinForms, WPF, Blazor, ASP.NET, Entity Framework Core, and WebForms. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 174 | 5/28/2026 |