TsadriuUtilities.DateTime 1.2.0

dotnet add package TsadriuUtilities.DateTime --version 1.2.0                
NuGet\Install-Package TsadriuUtilities.DateTime -Version 1.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TsadriuUtilities.DateTime" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TsadriuUtilities.DateTime --version 1.2.0                
#r "nuget: TsadriuUtilities.DateTime, 1.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 a DateTime object.
  • ToNullableDateTime(string date, CultureInfo cultureInfo, DateTimeStyles? dateTimeStyle, params string[] formats) + 2 overload:
    • Attempts to convert a date from a string to a nullable DateTime.
  • GetLastDayOfMonth(DateTime date):
    • Parses the date to return with the last day of the month.
  • SetDay(DateTime date, int day):
    • Sets the day of the month in the specified date.
  • SetMonth(DateTime date, int month):
    • Sets the month of the month in the specified date.
  • SetYear(DateTime date, int year):
    • Sets the year of the month in the specified date.
  • RemoveDays(DateTime date, int days):
    • Removes the specified number of days from the given days and returns the resulting date.
  • RemoveMonths(DateTime date, int months):
    • Removes the specified number of months from the given months and returns the resulting date.
  • RemoveYears(DateTime date, int years):
    • Removes the specified number of years from the given years and returns the resulting date.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last updated
1.2.0 140 3/7/2024
1.1.2 517 6/15/2023
1.1.1 144 6/14/2023
1.1.0 145 6/12/2023
1.0.3 140 6/12/2023
1.0.2 143 6/12/2023
1.0.1 134 5/25/2023
1.0.0 138 5/25/2023

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.