About
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.
Features
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 year and quarter, 2014-Q4
- YearWeek - a week in a week-based-year, 2014-W06
- OffsetDate - combines LocalDate and ZoneOffset
- Seconds, Minutes, Hours, Days, Weeks, Months and Years - amounts of time
- Interval - an interval between two instants
- LocalDateRange - a range between two dates
- PeriodDuration - combines Period and Duration
- More utilities, such as weekend adjusters
- Extended formatting of periods and durations, including word-based formatting
- Additional calendar systems
- Support for the TAI and UTC time-scales
Documentation
Various documentation is available:
- The helpful user guide
- The list of related projects
- The Javadoc
- The change notes for each release
- The GitHub source repository
Releases
Release 1.7.0 is the current release. This release is considered stable and worthy of the 1.x tag as per SemVer.
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.7.0</version> </dependency>