About

ThreeTen-Backport provides a backport of the Java SE 8 date-time classes to Java SE 6 and 7.

The backport is NOT an implementation of JSR-310, as that would require jumping through lots of unnecessary hoops. Instead, this is a simple backport intended to allow users to quickly use the JSR-310 API on Java SE 6 and 7. The backport should be referred to using the “ThreeTen” name. The backport is curated by the primary author of the Java 8 date and time library, Stephen Colebourne.

ThreeTen-Backport is licensed under the business-friendly BSD-3-Clause license.

Features

The features of the backport match those of Java SE 8:

  • Date and time value types
  • Formatting
  • Alternate calendar systems
  • Utilities

The API of ThreeTen-Extra matches that of Java SE 8 as far as practicable. Default and static methods on interfaces are simulated in the backport by using an abstract class rather than an interface. In addition, static query constants are used to simulate method references, for example use LocalDate.FROM rather than LocalDate::from.

Documentation

Various documentation is available:

Releases

Release 1.7.0 is the latest release. It is considered to be stable and usable in production.

The project runs on Java SE 6 (or later) and has no dependencies.

There are some known issues. The Hijrah calendar system does not work. Formatting and parsing often depends on data only available in Java SE 8. Zone id and text parsing is significantly less powerful.

Available in Maven Central.

<dependency>
  <groupId>org.threeten</groupId>
  <artifactId>threetenbp</artifactId>
  <version>1.7.0</version>
</dependency>

Back to top

Version: 1.7.0. Last Published: 2024-09-17.

Reflow Maven skin.