Czlovek.DateTime
1.0.10
See the version list below for details.
dotnet add package Czlovek.DateTime --version 1.0.10
NuGet\Install-Package Czlovek.DateTime -Version 1.0.10
<PackageReference Include="Czlovek.DateTime" Version="1.0.10" />
<PackageVersion Include="Czlovek.DateTime" Version="1.0.10" />
<PackageReference Include="Czlovek.DateTime" />
paket add Czlovek.DateTime --version 1.0.10
#r "nuget: Czlovek.DateTime, 1.0.10"
#:package Czlovek.DateTime@1.0.10
#addin nuget:?package=Czlovek.DateTime&version=1.0.10
#tool nuget:?package=Czlovek.DateTime&version=1.0.10
Description
This C# code provides extension methods for the DateTime class, allowing for the conversion of date and time values to and from Unix timestamps and ISO formatted strings.
Usage
To use these extension methods, simply import the Extensions class into your project and call them on a DateTime object.
FromIsoDate
This method converts a string in ISO format to a DateTime object. The format of the ISO string should be in yyyyMMdd format for dates, or yyyyMMddTHHmmss format for date and time.
string isoDateString = "20220312T152015"; DateTime dateTime = isoDateString.FromIsoDate();
FromUnixTime
This method converts a Unix timestamp to a DateTime object.
long unixTime = 1647148821000; DateTime dateTime = unixTime.FromUnixTime();
ToIsoDate
This method converts a DateTime object to an ISO formatted string in yyyyMMdd format.
DateTime dateTime = DateTime.Now; string isoDateString = dateTime.ToIsoDate();
ToUnixTime
This method converts a DateTime object to a Unix timestamp.
DateTime dateTime = DateTime.Now; long unixTime = dateTime.ToUnixTime();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 is compatible. 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. |
-
net7.0
- Czlovek.Strings (>= 1.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0-beta.85 | 53 | 6/16/2026 |
| 2.1.0-beta.84 | 60 | 5/7/2026 |
| 2.1.0-beta.83 | 58 | 5/7/2026 |
| 2.1.0-beta.82 | 89 | 3/20/2026 |
| 2.1.0-beta.81 | 75 | 2/21/2026 |
| 2.1.0-beta.80 | 78 | 2/21/2026 |
| 2.1.0-beta.79 | 84 | 2/13/2026 |
| 2.1.0-beta.78 | 78 | 2/11/2026 |
| 2.1.0-beta.77 | 78 | 2/11/2026 |
| 2.1.0-beta.76 | 70 | 2/10/2026 |
| 2.1.0-beta.75 | 82 | 2/10/2026 |
| 2.1.0-beta.74 | 82 | 1/28/2026 |
| 2.1.0-beta.73 | 216 | 11/6/2025 |
| 2.1.0-beta.72 | 196 | 11/6/2025 |
| 2.1.0-beta.71 | 193 | 11/4/2025 |
| 2.1.0-beta.70 | 195 | 11/4/2025 |
| 2.1.0-beta.69 | 191 | 11/4/2025 |
| 2.1.0-beta.68 | 193 | 11/4/2025 |
| 2.1.0-beta.67 | 204 | 11/2/2025 |
| 1.0.10 | 551 | 4/11/2023 |