TsadriuUtilities.DateTime
1.2.0
dotnet add package TsadriuUtilities.DateTime --version 1.2.0
NuGet\Install-Package TsadriuUtilities.DateTime -Version 1.2.0
<PackageReference Include="TsadriuUtilities.DateTime" Version="1.2.0" />
paket add TsadriuUtilities.DateTime --version 1.2.0
#r "nuget: TsadriuUtilities.DateTime, 1.2.0"
// Install TsadriuUtilities.DateTime as a Cake Addin #addin nuget:?package=TsadriuUtilities.DateTime&version=1.2.0 // Install TsadriuUtilities.DateTime as a Cake Tool #tool nuget:?package=TsadriuUtilities.DateTime&version=1.2.0
TsadriuUtilities.DateTime
A small package that helps on manipulating and managing DateTime types.
TsadriuUtilities.DateTime is a small library that helps on manipulating and managing DateTime types.
> Features <
DateTimeHelper:
- ToDateTime(string date, CultureInfo cultureInfo, DateTimeStyles? dateTimeStyle, params string[] formats) + 2 overload:
- Attempts to convert a date from a
string
to aDateTime
object.
- Attempts to convert a date from a
- ToNullableDateTime(string date, CultureInfo cultureInfo, DateTimeStyles? dateTimeStyle, params string[] formats) + 2 overload:
- Attempts to convert a date from a
string
to a nullableDateTime
.
- Attempts to convert a date from a
- GetLastDayOfMonth(DateTime date):
- Parses the
date
to return with the last day of the month.
- Parses the
- SetDay(DateTime date, int day):
- Sets the
day
of the month in the specifieddate
.
- Sets the
- SetMonth(DateTime date, int month):
- Sets the
month
of the month in the specifieddate
.
- Sets the
- SetYear(DateTime date, int year):
- Sets the
year
of the month in the specifieddate
.
- Sets the
- RemoveDays(DateTime date, int days):
- Removes the specified number of days from the given
days
and returns the resultingdate
.
- Removes the specified number of days from the given
- RemoveMonths(DateTime date, int months):
- Removes the specified number of months from the given
months
and returns the resultingdate
.
- Removes the specified number of months from the given
- RemoveYears(DateTime date, int years):
- Removes the specified number of years from the given
years
and returns the resultingdate
.
- Removes the specified number of years from the given
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 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 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. |
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TsadriuUtilities.DateTime:
Package | Downloads |
---|---|
TsadriuUtilities.Csv
TsadriuUtilities.Csv is a library that helps on dealing with **CSV** files, to make it easier and save a little bit of time. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Update the DateTimeHelper class by including methods for Unix timestamp conversion and write corresponding tests. Also, expand the target frameworks of the project to include .NET 8.0. The additional methods convert Unix timestamps to DateTime and vice versa, handling different cases such as local time zone, UTC, and optional TimeSpan, as well as specific exceptions.