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 yearDayOfYear
- a day-of-year without yearAmPm
- before or after middayQuarter
- the four quarters, Q1, Q2, Q3 and Q4YearQuarter
- combines year and quarter, 2014-Q4YearWeek
- a week in a week-based-year, 2014-W06YearHalf
- a half-year, 2014-H1OffsetDate
- combinesLocalDate
andZoneOffset
HourMinute
- time to minute precision, 10:24Seconds
,Minutes
,Hours
,Days
,Weeks
,Months
andYears
- amounts of timeInterval
- an interval between two instantsLocalDateRange
- a range between two datesPeriodDuration
- combinesPeriod
andDuration
- 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.8.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.8.0</version>
</dependency>