Allows you to write cleaner DateTime expressions and operation.
C#
Switch branches/tags
Clone or download
Latest commit cf4cd5c Jun 15, 2018

README.md

Icon

FluentDateTime

Partially inspired by Ruby DateTime Extensions

Allows you to write cleaner DateTime expressions and operation. For example your code can look like this:

  • DateTime.Now - 1.Weeks() - 3.Days() + 14.Minutes();
  • DateTime.Now + 5.Years();
  • 3.Days().Ago();
  • 2.Days().Since(DateTime.Now);
  • DateTime.Now.NextDay();
  • DateTime.Now.NextYear();
  • DateTime.Now.PreviousYear();
  • DateTime.Now.WeekAfter();
  • DateTime.Now.Midnight();
  • DateTime.Now.Noon();
  • DateTime.Now.SetTime(11, 55, 0);

(See Unit Tests in the project for more details).

Nuget

PM> Install-Package FluentDateTime

Icon

Calendar from The Noun Project