Skip to content
Lightweight date & time library for .NET
C# ASP JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
NDueTime.Demo
NDueTime.Test
NDueTime
References
.gitignore
NDueTime.sln
README.markdown

README.markdown

NDueTime

Lightweight date & time library for .NET

What NDueTime Is Not

Relative DateTime creation

Inspired by the Rails time extensions:

5.Minutes().Ago();

Creating Relative Time Expressions From DateTimes

Humane descriptions of relative times:

dateTime.ToRelativeTimeString();

Parsing Relative Time Expressions

Similar to scheduling events with Google Calendar:

RelativeDateTime.Parse("Next Tuesday at 3 PM");

Formatting TimeSpans

The DateTime struct has native support for string formatting, but TimeSpan has been left to fend for itself. NDueTime has a CustomFormatProvider for TimeSpans:

String.Format(new TimeSpanFormatProvider(), "{0:d} days, {0:h} hours, and {0:m} minutes", timeSpan);

Date Range

For when one date isn't enough:

new DateRange(from, to).Contains(other);
Something went wrong with that request. Please try again.