Noda Time
NodaTime Namespace
NamespacesNodaTime

[This is preliminary documentation and is subject to change.]

The NodaTime namespace contains the core types for Noda Time, including the main public classes for time zone and calendar support which have implementations (and less frequently used types) in other namespaces. For formatting and parsing functionality, see the NodaTime.Text namespace.

Declaration Syntax
C#Visual BasicVisual C++
namespace NodaTime
Namespace NodaTime
namespace NodaTime
Types
All TypesClassesStructuresInterfacesEnumerations
IconTypeDescription
AmbiguousTimeException
Exception thrown to indicate that the specified local date/time occurs twice in a particular time zone due to daylight saving time changes.

CalendarSystem
A calendar system maps the non-calendar-specific "local time line" to human concepts such as years, months and days.

OffsetDateTime..::..Comparer
Base class for OffsetDateTime comparers.

ZonedDateTime..::..Comparer
Base class for ZonedDateTime comparers.

DateTimeZone
Represents a time zone - a mapping between UTC and local time. A time zone maps UTC instants to local times - or, equivalently, to the offset from UTC at any particular instant.

DateTimeZoneProviders
Static access to date/time zone providers built into Noda Time and for global configuration where this is unavoidable. All properties are thread-safe, and the providers returned by the read-only properties cache their results.

Duration
Represents a fixed (and calendar-independent) length of time.

IClock
Represents a clock which can return the current time as an Instant.

IDateTimeZoneProvider
Provides stable, performant time zone data.

Instant
Represents an instant on the global timeline.

Interval
An interval between two instants in time (start and end).

IsoDayOfWeek
Equates the days of the week with their numerical value according to ISO-8601. This corresponds with System.DayOfWeek except for Sunday, which is 7 in the ISO numbering and 0 in System.DayOfWeek.

LocalDate
LocalDate is an immutable struct representing a date within the calendar, with no reference to a particular time zone or time of day.

LocalDateTime
A date and time in a particular calendar system. A LocalDateTime value does not represent an instant on the time line, because it has no associated time zone: "November 12th 2009 7pm, ISO calendar" occurred at different instants for different people around the world.

LocalTime
LocalTime is an immutable struct representing a time of day, with no reference to a particular calendar, time zone or date.

NodaConstants
Useful constants, mostly along the lines of "number of milliseconds in an hour".

Offset
An offset from UTC in milliseconds. A positive value means that the local time is ahead of UTC (e.g. for Europe); a negative value means that the local time is behind UTC (e.g. for America).

OffsetDateTime
A local date and time in a particular calendar system, combined with an offset from UTC. This is broadly similar to DateTimeOffset in the BCL.

Period
Represents a period of time expressed in human chronological terms: hours, days, weeks, months and so on.

PeriodBuilder
A mutable builder class for Period values. Each property can be set independently, and then a Period can be created from the result using the Build()()()() method.

PeriodUnits
The units within a Period. When a period is created to find the difference between two local values, the caller may specify which units are required - for example, you can ask for the difference between two dates in "years and weeks". Units are always applied largest-first in arithmetic.

SkippedTimeException
Exception thrown to indicate that the specified local time doesn't exist in a particular time zone due to daylight saving time changes.

SystemClock
Singleton implementation of IClock which reads the current system time. It is recommended that for anything other than throwaway code, this is only referenced in a single place in your code: where you provide a value to inject into the rest of your application, which should only depend on the interface.

ZonedDateTime
A LocalDateTime in a specific time zone and with a particular offset to distinguish between otherwise-ambiguous instants. A ZonedDateTime is global, in that it maps to a single Instant.