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, 2014Q4
- Days, Weeks, Months and Years - amounts of time
- Interval - an interval between two instants
- Weekend adjusters
- Coptic calendar system
- Ethiopic calendar system
- Julian calendar system
- Support for the TAI and UTC time-scales
There are no full releases yet! Release 0.9 is the current development release intended for feedback. The code is fully tested, but there may yet be bugs and the API may yet change. There should be no great reason why it cannot be used in production if you can cope with future API change.
The project runs on Java SE 8 and has no dependencies.
Available in Maven Central.
<dependency> <groupId>org.threeten</groupId> <artifactId>threeten-extra</artifactId> <version>0.9</version> </dependency>