Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Lightweight date & time library for .NET

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 NDueTime.Demo
Octocat-spinner-32 NDueTime.Test
Octocat-spinner-32 NDueTime
Octocat-spinner-32 References
Octocat-spinner-32 .gitignore
Octocat-spinner-32 NDueTime.sln
Octocat-spinner-32 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.