Uses of Interface
java.time.temporal.Temporal
Package
Description
The main API for dates, times, instants, and durations.
Generic API for calendar systems other than the default ISO.
Access to date and time using fields and units, and date time adjusters.
-
Uses of Temporal in java.time
Modifier and TypeClassDescriptionclass
An instantaneous point on the time-line.class
A date without a time-zone in the ISO-8601 calendar system, such as2007-12-03
.class
A date-time without a time-zone in the ISO-8601 calendar system, such as2007-12-03T10:15:30
.class
A time without a time-zone in the ISO-8601 calendar system, such as10:15:30
.class
A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as2007-12-03T10:15:30+01:00
.class
A time with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as10:15:30+01:00
.class
A year in the ISO-8601 calendar system, such as2007
.class
A year-month in the ISO-8601 calendar system, such as2007-12
.class
A date-time with a time-zone in the ISO-8601 calendar system, such as2007-12-03T10:15:30+01:00 Europe/Paris
.Modifier and TypeMethodDescriptionAdds this duration to the specified temporal object.Adds this period to the specified temporal object.DayOfWeek.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this day-of-week.Instant.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this instant.LocalDate.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date as this object.LocalDateTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date and time as this object.LocalTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same time as this object.Month.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this month-of-year.MonthDay.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this month-day.OffsetDateTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same offset, date and time as this object.OffsetTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same offset and time as this object.Year.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this year.YearMonth.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this year-month.ZoneOffset.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same offset as this object.Duration.subtractFrom(Temporal temporal)
Subtracts this duration from the specified temporal object.Period.subtractFrom(Temporal temporal)
Subtracts this period from the specified temporal object.Modifier and TypeMethodDescriptionAdds this duration to the specified temporal object.Adds this period to the specified temporal object.DayOfWeek.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this day-of-week.Instant.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this instant.LocalDate.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date as this object.LocalDateTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date and time as this object.LocalTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same time as this object.Month.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this month-of-year.MonthDay.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this month-day.OffsetDateTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same offset, date and time as this object.OffsetTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same offset and time as this object.Year.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this year.YearMonth.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have this year-month.ZoneOffset.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same offset as this object.static Duration
Obtains aDuration
representing the duration between two temporal objects.Duration.subtractFrom(Temporal temporal)
Subtracts this duration from the specified temporal object.Period.subtractFrom(Temporal temporal)
Subtracts this period from the specified temporal object.long
Instant.until(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another instant 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.long
LocalDateTime.until(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another date-time 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
OffsetDateTime.until(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another date-time 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
YearMonth.until(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another year-month 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. -
Uses of Temporal in java.time.chrono
Modifier and TypeInterfaceDescriptioninterface
A date without time-of-day or time-zone in an arbitrary chronology, intended for advanced globalization use cases.interface
ChronoLocalDateTime<D extends ChronoLocalDate>
A date-time without a time-zone in an arbitrary chronology, intended for advanced globalization use cases.interface
ChronoZonedDateTime<D extends ChronoLocalDate>
A date-time with a time-zone in an arbitrary chronology, intended for advanced globalization use cases.Modifier and TypeClassDescriptionclass
A date in the Hijrah calendar system.class
A date in the Japanese Imperial calendar system.class
A date in the Minguo calendar system.class
A date in the Thai Buddhist calendar system.Modifier and TypeMethodDescriptionAdds this period to the specified temporal object.default Temporal
ChronoLocalDate.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date as this object.default Temporal
ChronoLocalDateTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date and time as this object.default Temporal
Era.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same era as this object.ChronoPeriod.subtractFrom(Temporal temporal)
Subtracts this period from the specified temporal object.Modifier and TypeMethodDescriptionAdds this period to the specified temporal object.default Temporal
ChronoLocalDate.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date as this object.default Temporal
ChronoLocalDateTime.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same date and time as this object.default Temporal
Era.adjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same era as this object.ChronoPeriod.subtractFrom(Temporal temporal)
Subtracts this period from the specified temporal object.long
ChronoLocalDate.until(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another date in terms of the specified unit. -
Uses of Temporal in java.time.temporal
Modifier and TypeMethodDescription<R extends Temporal>
RChronoUnit.addTo(R temporal, long amount)
<R extends Temporal>
RTemporalUnit.addTo(R temporal, long amount)
Returns a copy of the specified temporal object with the specified period added.<R extends Temporal>
RChronoField.adjustInto(R temporal, long newValue)
<R extends Temporal>
RTemporalField.adjustInto(R temporal, long newValue)
Returns a copy of the specified temporal object with the value of this field set.Modifier and TypeMethodDescriptionAdds to the specified temporal object.TemporalAdjuster.adjustInto(Temporal temporal)
Adjusts the specified temporal object.default Temporal
Temporal.minus(long amountToSubtract, TemporalUnit unit)
Returns an object of the same type as this object with the specified period subtracted.default Temporal
Temporal.minus(TemporalAmount amount)
Returns an object of the same type as this object with an amount subtracted.Temporal.plus(long amountToAdd, TemporalUnit unit)
Returns an object of the same type as this object with the specified period added.default Temporal
Temporal.plus(TemporalAmount amount)
Returns an object of the same type as this object with an amount added.TemporalAmount.subtractFrom(Temporal temporal)
Subtracts this object from the specified temporal object.default Temporal
Temporal.with(TemporalAdjuster adjuster)
Returns an adjusted object of the same type as this object with the adjustment made.Temporal.with(TemporalField field, long newValue)
Returns an object of the same type as this object with the specified field altered.Modifier and TypeMethodDescriptionAdds to the specified temporal object.TemporalAdjuster.adjustInto(Temporal temporal)
Adjusts the specified temporal object.long
long
Calculates the amount of time between two temporal objects.default boolean
TemporalUnit.isSupportedBy(Temporal temporal)
Checks if this unit is supported by the specified temporal object.TemporalAmount.subtractFrom(Temporal temporal)
Subtracts this object from the specified temporal object.long
Temporal.until(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another temporal in terms of the specified unit.