| Package | Description | 
|---|---|
| java.time | 
 The main API for dates, times, instants, and durations. | 
| java.time.chrono | 
 Generic API for calendar systems other than the default ISO. | 
| java.time.temporal | 
 Access to date and time using fields and units, and date time adjusters. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<TemporalUnit> | Duration. getUnits()Gets the set of units supported by this duration. | 
| List<TemporalUnit> | Period. getUnits()Gets the set of units supported by this period. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | Duration. get(TemporalUnit unit)Gets the value of the requested unit. | 
| long | Period. get(TemporalUnit unit)Gets the value of the requested unit. | 
| boolean | LocalDateTime. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | ZonedDateTime. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | OffsetDateTime. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | YearMonth. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | OffsetTime. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | Year. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | Instant. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | LocalTime. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| boolean | LocalDate. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| LocalDateTime | LocalDateTime. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this date-time with the specified amount subtracted. | 
| ZonedDateTime | ZonedDateTime. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this date-time with the specified amount subtracted. | 
| OffsetDateTime | OffsetDateTime. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this date-time with the specified amount subtracted. | 
| YearMonth | YearMonth. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this year-month with the specified amount subtracted. | 
| OffsetTime | OffsetTime. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this time with the specified amount subtracted. | 
| Year | Year. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this year with the specified amount subtracted. | 
| Instant | Instant. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this instant with the specified amount subtracted. | 
| Duration | Duration. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this duration with the specified duration subtracted. | 
| LocalTime | LocalTime. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this time with the specified amount subtracted. | 
| LocalDate | LocalDate. minus(long amountToSubtract,
     TemporalUnit unit)Returns a copy of this date with the specified amount subtracted. | 
| static Duration | Duration. of(long amount,
  TemporalUnit unit)Obtains a  Durationrepresenting an amount in the specified unit. | 
| LocalDateTime | LocalDateTime. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this date-time with the specified amount added. | 
| ZonedDateTime | ZonedDateTime. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this date-time with the specified amount added. | 
| OffsetDateTime | OffsetDateTime. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this date-time with the specified amount added. | 
| YearMonth | YearMonth. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this year-month with the specified amount added. | 
| OffsetTime | OffsetTime. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this time with the specified amount added. | 
| Year | Year. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this year with the specified amount added. | 
| Instant | Instant. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this instant with the specified amount added. | 
| Duration | Duration. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this duration with the specified duration added. | 
| LocalTime | LocalTime. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this time with the specified amount added. | 
| LocalDate | LocalDate. plus(long amountToAdd,
    TemporalUnit unit)Returns a copy of this date with the specified amount added. | 
| LocalDateTime | LocalDateTime. truncatedTo(TemporalUnit unit)Returns a copy of this  LocalDateTimewith the time truncated. | 
| ZonedDateTime | ZonedDateTime. truncatedTo(TemporalUnit unit)Returns a copy of this  ZonedDateTimewith the time truncated. | 
| OffsetDateTime | OffsetDateTime. truncatedTo(TemporalUnit unit)Returns a copy of this  OffsetDateTimewith the time truncated. | 
| OffsetTime | OffsetTime. truncatedTo(TemporalUnit unit)Returns a copy of this  OffsetTimewith the time truncated. | 
| Instant | Instant. truncatedTo(TemporalUnit unit)Returns a copy of this  Instanttruncated to the specified unit. | 
| LocalTime | LocalTime. truncatedTo(TemporalUnit unit)Returns a copy of this  LocalTimewith the time truncated. | 
| long | LocalDateTime. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another date-time in terms of the specified unit. | 
| long | ZonedDateTime. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another date-time in terms of the specified unit. | 
| long | OffsetDateTime. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another date-time in terms of the specified unit. | 
| long | YearMonth. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another year-month in terms of the specified unit. | 
| long | OffsetTime. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another time in terms of the specified unit. | 
| long | Year. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another year in terms of the specified unit. | 
| long | Instant. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another instant in terms of the specified unit. | 
| long | LocalTime. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another time in terms of the specified unit. | 
| long | LocalDate. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another date in terms of the specified unit. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<TemporalUnit> | ChronoPeriod. getUnits()Gets the set of units supported by this period. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | ChronoPeriod. get(TemporalUnit unit)Gets the value of the requested unit. | 
| default boolean | ChronoLocalDateTime. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| default boolean | ChronoLocalDate. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| default boolean | ChronoZonedDateTime. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| MinguoDate | MinguoDate. minus(long amountToAdd,
     TemporalUnit unit) | 
| ThaiBuddhistDate | ThaiBuddhistDate. minus(long amountToAdd,
     TemporalUnit unit) | 
| HijrahDate | HijrahDate. minus(long amountToSubtract,
     TemporalUnit unit) | 
| default ChronoLocalDateTime<D> | ChronoLocalDateTime. minus(long amountToSubtract,
     TemporalUnit unit)Returns an object of the same type as this object with the specified period subtracted. | 
| default ChronoLocalDate | ChronoLocalDate. minus(long amountToSubtract,
     TemporalUnit unit)Returns an object of the same type as this object with the specified period subtracted. | 
| JapaneseDate | JapaneseDate. minus(long amountToAdd,
     TemporalUnit unit) | 
| default ChronoZonedDateTime<D> | ChronoZonedDateTime. minus(long amountToSubtract,
     TemporalUnit unit)Returns an object of the same type as this object with the specified period subtracted. | 
| MinguoDate | MinguoDate. plus(long amountToAdd,
    TemporalUnit unit) | 
| ThaiBuddhistDate | ThaiBuddhistDate. plus(long amountToAdd,
    TemporalUnit unit) | 
| HijrahDate | HijrahDate. plus(long amountToAdd,
    TemporalUnit unit) | 
| ChronoLocalDateTime<D> | ChronoLocalDateTime. plus(long amountToAdd,
    TemporalUnit unit)Returns an object of the same type as this object with the specified period added. | 
| default ChronoLocalDate | ChronoLocalDate. plus(long amountToAdd,
    TemporalUnit unit)Returns an object of the same type as this object with the specified period added. | 
| JapaneseDate | JapaneseDate. plus(long amountToAdd,
    TemporalUnit unit) | 
| ChronoZonedDateTime<D> | ChronoZonedDateTime. plus(long amountToAdd,
    TemporalUnit unit)Returns an object of the same type as this object with the specified period added. | 
| long | ChronoLocalDate. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another date in terms of the specified unit. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | ChronoUnitA standard set of date periods units. | 
| Modifier and Type | Field and Description | 
|---|---|
| static TemporalUnit | IsoFields. QUARTER_YEARSUnit that represents the concept of a quarter-year. | 
| static TemporalUnit | IsoFields. WEEK_BASED_YEARSThe unit that represents week-based-years for the purpose of addition and subtraction. | 
| static TemporalUnit | WeekFields. WEEK_BASED_YEARSThe unit that represents week-based-years for the purpose of addition and subtraction. | 
| Modifier and Type | Method and Description | 
|---|---|
| TemporalUnit | ChronoField. getBaseUnit() | 
| TemporalUnit | TemporalField. getBaseUnit()Gets the unit that the field is measured in. | 
| TemporalUnit | ChronoField. getRangeUnit() | 
| TemporalUnit | TemporalField. getRangeUnit()Gets the range that the field is bound by. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<TemporalUnit> | TemporalAmount. getUnits()Returns the list of units uniquely defining the value of this TemporalAmount. | 
| static TemporalQuery<TemporalUnit> | TemporalQueries. precision()A query for the smallest supported unit. | 
| Modifier and Type | Method and Description | 
|---|---|
| long | TemporalAmount. get(TemporalUnit unit)Returns the value of the requested unit. | 
| boolean | Temporal. isSupported(TemporalUnit unit)Checks if the specified unit is supported. | 
| default Temporal | Temporal. minus(long amountToSubtract,
     TemporalUnit unit)Returns an object of the same type as this object with the specified period subtracted. | 
| Temporal | Temporal. plus(long amountToAdd,
    TemporalUnit unit)Returns an object of the same type as this object with the specified period added. | 
| long | Temporal. until(Temporal endExclusive,
     TemporalUnit unit)Calculates the amount of time until another temporal in terms of the specified unit. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2017, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.