EasyDateTime 1.0.3

dotnet add package EasyDateTime --version 1.0.3                
NuGet\Install-Package EasyDateTime -Version 1.0.3                
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="EasyDateTime" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyDateTime --version 1.0.3                
#r "nuget: EasyDateTime, 1.0.3"                
#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 EasyDateTime as a Cake Addin
#addin nuget:?package=EasyDateTime&version=1.0.3

// Install EasyDateTime as a Cake Tool
#tool nuget:?package=EasyDateTime&version=1.0.3                

EasyDateTime

Extension library to work with date time much easier.

Make your code using DateTime easier to read by fluently constructing DateTime objects.

// 25 years ago
DateTime birthDate = 25.Years().Ago();

// 15 minutes from now
DateTime executeTime = 15.Minutes().FromNow();

// Define using clock
DateTime downloadTime = 15.OClock();

// Durations
TimeSpan maxTimeOut = 30.Seconds();

// Exact dates using month names
DateTime myPartyDate = 19.January(2020);
DateTime examDate = 20.March(); // current year

// Asserting day of week
bool CanDrinkBeer() => DateTime.Now.IsFriday();
bool IsChurchDay() => DateTime.Now.IsSunday();

// Closed Period
bool IsHoliday() => Period.From(25.December())
					.Until(31.December())
					.IsCurrentlyActive;

// Open Period
bool IsSchoolTime() => Period.Before(4.OClock());

// Scheduled actions
Action act = () => Console.WriteLine("test");
act.DoEvery(10.Seconds(), times: 100).WithoutWaiting(() => {
	Console.WriteLine("I am finished.");
});

Available as Nuget package: https://www.nuget.org/packages/EasyDateTime/

PM> Install-Package EasyDateTime
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has 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.

Version Downloads Last updated
1.0.3 1,262 3/31/2018