DotNetThoughts.LocalTimeKit
1.0.1
dotnet add package DotNetThoughts.LocalTimeKit --version 1.0.1
NuGet\Install-Package DotNetThoughts.LocalTimeKit -Version 1.0.1
<PackageReference Include="DotNetThoughts.LocalTimeKit" Version="1.0.1" />
paket add DotNetThoughts.LocalTimeKit --version 1.0.1
#r "nuget: DotNetThoughts.LocalTimeKit, 1.0.1"
// Install DotNetThoughts.LocalTimeKit as a Cake Addin #addin nuget:?package=DotNetThoughts.LocalTimeKit&version=1.0.1 // Install DotNetThoughts.LocalTimeKit as a Cake Tool #tool nuget:?package=DotNetThoughts.LocalTimeKit&version=1.0.1
Local Time Kit
LocalDateTime
LocalDateTime
is an unambiguous representation of an instance in time.
Types like DateTime
and DateOnly
does not provide enough information to determine exactly what instance in time they represent. LocalDateTime aims to package all you need into one type.
Don't worry about the word "Local" in the name. LocalDateTime is not limited to local instances in time in the normal sense. LocalDateTime consider even a UTC date to be local. Local to the utc time zone.
While .Net has a lot of shady "helpful" implicit conversions between DateTime
and DateTimeOffset
, LocalDateTime is explicit about what it does.
No time-operations, makes any sense without knowing which timezone you are operating in. Remember, daylight savings have the effect of some days lasting only 23 hours, while others last 25.
LocalDateTime therefor requires you to specify a timezone when you create an instance.
LocalDateTime then helps you to convert between timezones, and to calculate timezone-related specific instances of time, like beginning of year, or midnight of current day etc.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.