This Javadoc is for an alpha release of the ThreeTen project.

See:
          Description

Packages
java.util Amended OpenJDK classes that integrate JSR-310 with the existing date and time APIs.
javax.time Provides classes to manage the continuous time scale including a wrapper for the system clock.
javax.time.calendar Provides classes to manage the human time scale including date, time, date-time and time-zone representations.
javax.time.calendar.format Provides classes to format dates and times as strings.
javax.time.calendar.zone Provides classes to implement time-zones and their rules.
javax.time.i18n Provides classes representing dates and times in alternate calendar systems.

 

This Javadoc is for an alpha release of the ThreeTen project. The JSR-310 specification will be derived over time from the ThreeTen project. Since the ThreeTen project is incomplete, the JSR-310 specification is also incomplete..

ThreeTen defines a new Date and Time API for Java. The API describes the two basic forms of time - machine and human.

Machine time is designed for machines, and is defined by a single incrementing number. This is often associated with the result from System.currentTimeMillis().

The main class for representing machine time is Instant. It uses nanosecond precision and can support a range greater than the age of the universe.

Human time is designed for humans, and is based around meaningful fields. Examples of the fields include year, month-of-year, quarter-of-year and hour-of-day.

The most basic classes representing human time are LocalDate, LocalTime and LocalDateTime. These represent dates and times without any offset from UTC or time-zone.

The next level of classes add the offset from UTC, such as "+01:00" - OffsetDate, OffsetTime and OffsetDateTime. These still do not contain time-zone information, just the offset.

The final level adds the time-zone rules, such as "Europe/London" - ZonedDateTime.

In combination, these seven classes represent the possible combinations of valid date and time information. Furthermore, these classes can only ever be in a valid state. They are also immutable.

These classes, and the whole of the main API, is specific to the ISO calendar system. This is the de facto world calendar following the proleptic Gregorian rules. The i18n package contains other calendar systems.