A better date and time API for .NET

Noda Time is an alternative date and time API for .NET. It helps you to think about your data more clearly, and express operations on that data more precisely.

Examples (see User Guide)

// Instant represents time from epoch
Instant now = SystemClock.Instance.GetCurrentInstant();

// Convert an instant to a ZonedDateTime
ZonedDateTime nowInIsoUtc = now.InUtc();

// Create a duration
Duration duration = Duration.FromMinutes(3);

// Add it to our ZonedDateTime
ZonedDateTime thenInIsoUtc = nowInIsoUtc + duration;

// Time zone support (multiple providers)
var london = DateTimeZoneProviders.Tzdb["Europe/London"];

// Time zone conversions
var localDate = new LocalDateTime(2012, 3, 27, 0, 45, 00);
var before = london.AtStrictly(localDate);

More Info

Community

Find out more about Noda Time on our group mailing list or our blog.

For more specific "How do I solve problem X?" questions, please ask on Stack Overflow using the nodatime tag.

The issue tracker is hosted on the project's GitHub site.

Documentation

It is recommended that you read at least the first few pages of the User Guide before starting to develop using Noda Time.

You can also check out the API reference.

Noda Time is licensed under the Apache 2.0 license.

Contributing

Developers interested in contributing to Noda Time itself should also check out the Developer Guide and current roadmap.

If you just want the code, you can check it out from the repository.

Installation

Main library
Install-Package NodaTime
Useful when testing code
Install-Package NodaTime.Testing
Json.NET serialization
Install-Package NodaTime.Serialization.JsonNet