EasyDate 2.3.0-beta

This is a prerelease version of EasyDate.
There is a newer version of this package available.
See the version list below for details.
dotnet add package EasyDate --version 2.3.0-beta                
NuGet\Install-Package EasyDate -Version 2.3.0-beta                
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="EasyDate" Version="2.3.0-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyDate --version 2.3.0-beta                
#r "nuget: EasyDate, 2.3.0-beta"                
#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 EasyDate as a Cake Addin
#addin nuget:?package=EasyDate&version=2.3.0-beta&prerelease

// Install EasyDate as a Cake Tool
#tool nuget:?package=EasyDate&version=2.3.0-beta&prerelease                

EasyDate

EasyDate is a library for generating DateTime objects fluently in a highly readable and descriptive manner. It simplifies the creation of DateTime instances, enhancing code clarity and maintainability. This library is perfect for all programming scenarios, especially unit tests where readability is crucial.

Features

  • Fluent and Descriptive: Generate DateTime objects using a fluent interface that reads like natural language.
  • Readable and Maintainable: Improves code readability and maintainability, making it easier to understand and modify.
  • Versatile: Suitable for all programming parts, particularly useful in unit tests.

Example Usage

Here's an example of how to use the EasyDate:

using EasyDate;

var myBirthDay = GoTo
    .Month(Month.August)
    .OnDay(Day.TwentyFourth)
    .AtYear(1985)
    .At(22,53)
    .LetsGo();

Console.WriteLine(myBirthDay); // 8/24/1985 10:53:00 PM

var today = GoTo.Today().LetsGo();
Console.WriteLine($"Today's date is: {today}"); // Today's date is: 6/14/2024 6:15:08 PM

var lastDayOfJanuary = GoTo
    .LastDay()
    .InMonth(Month.January)
    .AtYear(2024)
    .At(15,20,35)
    .LetsGo();

Console.WriteLine($"Last day of Jan is: {lastDayOfJanuary}"); // Last day of Jan is: 1/31/2024 3:20:35 PM
using EasyDate;

8.August(1985).At(23,15);                       // 8/8/1985 11:15:00 PM
4.Days().Before(DateTime.Now);                  // 6/10/2024 6:20:36 PM
2.Weeks().After(DateTime.Now);                  // 6/28/2024 6:20:36 PM
10.Months().Before(DateTime.Now).At(14,30,50);  // 8/14/2023 2:30:50 PM
6.Weeks().Later();                              // 7/26/2024 6:20:36 PM
2.Years().Ago();                                // 6/14/2022 6:20:36 PM
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.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.

Version Downloads Last updated
2.3.0 75 6/24/2024
2.3.0-beta.7 47 6/20/2024
2.3.0-beta 75 6/16/2024
2.2.0 90 6/15/2024