Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A fluent interface in C# for working with dates and times on the .NET framework
C#
branch: master
Failed to load latest commit information.
FluentTime.Tests
FluentTime Tiny refactor: introduce constant mostly just to try out MonoDevelop'…
.gitignore Ignore MonoDevelop files.
FluentTime.nuspec Tweak nuspec.
FluentTime.sln
LICENSE.txt Add licensing.
README.md Added short helpers for creating DateTimes related to Today, Tomorrow…

README.md

FluentTime

A fluent interface in .NET for working with dates and times, inspired by ActiveSupport's active_support/core_ext/numeric/time extensions.

Do stuff like this:

var toothBrushingTime = 10.Minutes().Before(bedTime);
var lightsOutForReal = 1.Hour(30.Minutes()).After(bedTime);
...
Assert.That(actual, Is.LessThan(50.Milliseconds().After(expected)));
...
var bestDaysOfMyLife = 30.Days().Ago();
...
var movingAppointment = 15.May(2011).At(2).PM();
...
var allPlayAndNoWork = Today.At(16, 00);
... 
var sushiTime = Yesterday.At(21, 00);
...
var workAgain = Tomorrow.At(08, 00);

The "Before" and "After" stuff supports both DateTime and DateTimeOffset and returns the same type you start with. The Offset of the input DateTimeOffset is maintained.

Look at the tests for details.


Copyright 2011 ThoughtWorks, Inc. See LICENSE.txt for licensing info.

Something went wrong with that request. Please try again.