Uses of Interface
java.time.temporal.TemporalAmount
Packages that use 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
Classes in java.time that implement TemporalAmountModifier and TypeClassDescriptionfinal classA time-based amount of time, such as '34.5 seconds'.final classA date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'.Methods in java.time with parameters of type TemporalAmountModifier and TypeMethodDescriptionstatic DurationDuration.from(TemporalAmount amount) Obtains an instance ofDurationfrom a temporal amount.static PeriodPeriod.from(TemporalAmount amount) Obtains an instance ofPeriodfrom 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
Subinterfaces of TemporalAmount in java.time.chronoModifier and TypeInterfaceDescriptioninterfaceA date-based amount of time, such as '3 years, 4 months and 5 days' in an arbitrary chronology, intended for advanced globalization use cases.Methods in java.time.chrono with parameters of type TemporalAmountModifier and TypeMethodDescriptiondefault ChronoLocalDateChronoLocalDate.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 ChronoLocalDateChronoLocalDate.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
Methods in java.time.temporal with parameters of type TemporalAmountModifier and TypeMethodDescriptiondefault TemporalTemporal.minus(TemporalAmount amount) Returns an object of the same type as this object with an amount subtracted.default TemporalTemporal.plus(TemporalAmount amount) Returns an object of the same type as this object with an amount added.