Represents an annual date (month and day) in the ISO calendar but without a specific year,
typically for recurrent events such as birthdays, anniversaries, and deadlines.
IClock is intended for use anywhere you need to have access to the current time.
Although it's not strictly incorrect to call SystemClock.Instance.GetCurrentInstant() directly,
in the same way as you might call DateTime.UtcNow, it's strongly discouraged
as a matter of style for production code. We recommend providing an instance of IClock
to anything that needs it, which allows you to write tests using the fake clock in the TimeMachine.Testing
assembly (or your own implementation).
A date and time in a particular calendar system. A LocalDateTime value does not represent an
instant on the global 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.
An offset from UTC in seconds. 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).
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.
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.
Commonly-used implementations of the delegates used in resolving a LocalDateTime to a
ZonedDateTime, and a method to combine two 'partial' resolvers into a full one.
Singleton implementation of Clock 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.
Useful constants, mostly along the lines of 'number of milliseconds in an hour'.
Useful constants, mostly along the lines of 'number of milliseconds in an hour'.
A rule determining how 'week years' are arranged, including the weeks within the week year.
Implementations provided by Time Machine itself can be obtained via the WeekYearRules
class.
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.
Exception thrown to indicate that a time zone source has violated the contract of IDateTimeZoneSource.
This exception is primarily intended to be thrown from DateTimeZoneCache, and only in the face of a buggy
source; user code should not usually need to be aware of this or catch it.
Exception thrown when data read by Time Machine (such as serialized time zone data) is invalid. This includes
data which is truncated, i.e. we expect more data than we can read.