ThreeTen-Extra provides additional date-time classes that complement those in Java SE 8.
Not every piece of date/time logic is destined for the JDK. Some concepts are too specialized or too bulky to make it in. This project provides some of those additional classes as a well-tested and reliable jar. It is curated by the primary author of the Java 8 date and time library, Stephen Colebourne.
ThreeTen-Extra is licensed under the business-friendly BSD 3-clause license.
The following features are included:
- DayOfMonth - a day-of-month without month or year
- DayOfYear - a day-of-year without year
- AmPm - before or after midday
- Quarter - the four quarters, Q1, Q2, Q3 and Q4
- YearQuarter - combines a year and quarter, 2014-Q4
- YearWeek - combines a week-based-year and a week, 2014-W06
- Days, Weeks, Months and Years - amounts of time
- Interval - an interval between two instants
- PeriodDuration - combines Period and Duration
- Weekend adjusters
- Coptic calendar system
- Ethiopic calendar system
- Julian calendar system
- Word-based period and duration formatting
- Support for the TAI and UTC time-scales
Release 1.5.0 is the current release. This release is considered stable and worthy of the 1.x tag.
ThreeTen-Extra requires Java SE 8 or later and has no dependencies.
Available in Maven Central.
<dependency> <groupId>org.threeten</groupId> <artifactId>threeten-extra</artifactId> <version>1.5.0</version> </dependency>