Uses of Interface
java.time.temporal.TemporalAmount
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 TemporalAmount in java.time
Modifier and TypeClassDescriptionfinal class
A time-based amount of time, such as '34.5 seconds'.final class
A date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'.Modifier and TypeMethodDescriptionstatic Duration
Duration.from
(TemporalAmount amount) Obtains an instance ofDuration
from a temporal amount.static Period
Period.from
(TemporalAmount amount) Obtains an instance ofPeriod
from a temporal amount.Instant.minus
(TemporalAmount amountToSubtract) Returns a copy of this instant with the specified amount subtracted.LocalDate.minus
(TemporalAmount amountToSubtract) Returns a copy of this date with the specified amount subtracted.LocalDateTime.minus
(TemporalAmount amountToSubtract) Returns a copy of this date-time with the specified amount subtracted.LocalTime.minus
(TemporalAmount amountToSubtract) Returns a copy of this time with the specified amount subtracted.OffsetDateTime.minus
(TemporalAmount amountToSubtract) Returns a copy of this date-time with the specified amount subtracted.OffsetTime.minus
(TemporalAmount amountToSubtract) Returns a copy of this time with the specified amount subtracted.Period.minus
(TemporalAmount amountToSubtract) Returns a copy of this period with the specified period subtracted.Year.minus
(TemporalAmount amountToSubtract) Returns a copy of this year with the specified amount subtracted.YearMonth.minus
(TemporalAmount amountToSubtract) Returns a copy of this year-month with the specified amount subtracted.ZonedDateTime.minus
(TemporalAmount amountToSubtract) Returns a copy of this date-time with the specified amount subtracted.Instant.plus
(TemporalAmount amountToAdd) Returns a copy of this instant with the specified amount added.LocalDate.plus
(TemporalAmount amountToAdd) Returns a copy of this date with the specified amount added.LocalDateTime.plus
(TemporalAmount amountToAdd) Returns a copy of this date-time with the specified amount added.LocalTime.plus
(TemporalAmount amountToAdd) Returns a copy of this time with the specified amount added.OffsetDateTime.plus
(TemporalAmount amountToAdd) Returns a copy of this date-time with the specified amount added.OffsetTime.plus
(TemporalAmount amountToAdd) Returns a copy of this time with the specified amount added.Period.plus
(TemporalAmount amountToAdd) Returns a copy of this period with the specified period added.Year.plus
(TemporalAmount amountToAdd) Returns a copy of this year with the specified amount added.YearMonth.plus
(TemporalAmount amountToAdd) Returns a copy of this year-month with the specified amount added.ZonedDateTime.plus
(TemporalAmount amountToAdd) Returns a copy of this date-time with the specified amount added. -
Uses of TemporalAmount in java.time.chrono
Modifier and TypeInterfaceDescriptioninterface
A date-based amount of time, such as '3 years, 4 months and 5 days' in an arbitrary chronology, intended for advanced globalization use cases.Modifier and TypeMethodDescriptiondefault ChronoLocalDate
ChronoLocalDate.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.default ChronoLocalDateTime
<D> ChronoLocalDateTime.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.ChronoPeriod.minus
(TemporalAmount amountToSubtract) Returns a copy of this period with the specified period subtracted.default ChronoZonedDateTime
<D> ChronoZonedDateTime.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.HijrahDate.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.JapaneseDate.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.MinguoDate.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.ThaiBuddhistDate.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.default ChronoLocalDate
ChronoLocalDate.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added.default ChronoLocalDateTime
<D> ChronoLocalDateTime.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added.ChronoPeriod.plus
(TemporalAmount amountToAdd) Returns a copy of this period with the specified period added.default ChronoZonedDateTime
<D> ChronoZonedDateTime.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added.HijrahDate.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added.JapaneseDate.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added.MinguoDate.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added.ThaiBuddhistDate.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added. -
Uses of TemporalAmount in java.time.temporal
Modifier and TypeMethodDescriptiondefault Temporal
Temporal.minus
(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.default Temporal
Temporal.plus
(TemporalAmount amount) Returns an object of the same type as this object with an amount added.