Allows you to write cleaner DateTime expressions and operation.
C#
Latest commit 7d50910 Mar 1, 2016 @SimonCropp SimonCropp force vs 2015
Permalink
Failed to load latest commit information.
FluentDateTime bump version Mar 1, 2016
FluentDateTimeTests Adding SameDay, SameMonth and SameYear methods Nov 25, 2015
Icons icon stuff Apr 3, 2013
NuGet fix build error Mar 1, 2016
Tools simplify Aug 24, 2014
packages simplify Aug 24, 2014
.gitattributes icon stuff Apr 3, 2013
.gitignore add code only package Oct 6, 2013
FluentDateTimeSolution.sln force vs 2015 Mar 1, 2016
README.md doco Oct 6, 2013
key.snk try old key Aug 5, 2012

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

There are two nuget packages

The binary version

This uses the standard approach to constructing a nuget package. It contains a dll which will be added as a reference to your project. You then deploy the binary with your project.

PM> Install-Package FluentDateTime

The code only version

This is a "code only" package that leverages the Content Convention of Nuget to inject code files into your project. Note that this is only compatible with C# projects.

The benefits of this approach are ease of debugging and less files to deploy

PM> Install-Package FluentDateTime-CodeOnly

Icon

Calendar from The Noun Project