Uses of Interface
org.threeten.bp.temporal.TemporalUnit
Packages that use TemporalUnit
Package
Description
The main API for dates, times, instants, and durations.
Support for calendar systems other than the default ISO.
Access to date and time using fields and units.
-
Uses of TemporalUnit in org.threeten.bp
Methods in org.threeten.bp that return types with arguments of type TemporalUnitMethods in org.threeten.bp with parameters of type TemporalUnitModifier and TypeMethodDescriptionlong
Duration.get(TemporalUnit unit)
long
Period.get(TemporalUnit unit)
boolean
Instant.isSupported(TemporalUnit unit)
boolean
LocalDateTime.isSupported(TemporalUnit unit)
boolean
LocalTime.isSupported(TemporalUnit unit)
boolean
OffsetDateTime.isSupported(TemporalUnit unit)
boolean
OffsetTime.isSupported(TemporalUnit unit)
boolean
Year.isSupported(TemporalUnit unit)
boolean
YearMonth.isSupported(TemporalUnit unit)
boolean
ZonedDateTime.isSupported(TemporalUnit unit)
Duration.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this duration with the specified duration subtracted.Instant.minus(long amountToSubtract, TemporalUnit unit)
Returns an object of the same type as this object with the specified period subtracted.LocalDate.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this date with the specified period subtracted.LocalDateTime.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this date-time with the specified period subtracted.LocalTime.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this time with the specified period subtracted.OffsetDateTime.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this date-time with the specified period subtracted.OffsetTime.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this time with the specified period subtracted.Year.minus(long amountToSubtract, TemporalUnit unit)
Returns an object of the same type as this object with the specified period subtracted.YearMonth.minus(long amountToSubtract, TemporalUnit unit)
Returns an object of the same type as this object with the specified period subtracted.ZonedDateTime.minus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this date-time with the specified period subtracted.static Duration
Duration.of(long amount, TemporalUnit unit)
Obtains an instance ofDuration
from a duration in the specified unit.Duration.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this duration with the specified duration added.Instant.plus(long amountToAdd, TemporalUnit unit)
Returns an object of the same type as this object with the specified period added.LocalDate.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this date with the specified period added.LocalDateTime.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this date-time with the specified period added.LocalTime.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this time with the specified period added.OffsetDateTime.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this date-time with the specified period added.OffsetTime.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this time with the specified period added.Year.plus(long amountToAdd, TemporalUnit unit)
Returns an object of the same type as this object with the specified period added.YearMonth.plus(long amountToAdd, TemporalUnit unit)
Returns an object of the same type as this object with the specified period added.ZonedDateTime.plus(long amountToAdd, TemporalUnit unit)
Returns a copy of this date-time with the specified period added.Instant.truncatedTo(TemporalUnit unit)
Returns a copy of thisInstant
truncated to the specified unit.LocalDateTime.truncatedTo(TemporalUnit unit)
Returns a copy of thisLocalDateTime
with the time truncated.LocalTime.truncatedTo(TemporalUnit unit)
Returns a copy of thisLocalTime
with the time truncated.OffsetDateTime.truncatedTo(TemporalUnit unit)
Returns a copy of thisOffsetDateTime
with the time truncated.OffsetTime.truncatedTo(TemporalUnit unit)
Returns a copy of thisOffsetTime
with the time truncated.ZonedDateTime.truncatedTo(TemporalUnit unit)
Returns a copy of thisZonedDateTime
with the time truncated.long
Instant.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this instant and another instant in terms of the specified unit.long
LocalDate.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this date and another date in terms of the specified unit.long
LocalDateTime.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this date-time and another date-time in terms of the specified unit.long
LocalTime.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this time and another time in terms of the specified unit.long
OffsetDateTime.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this date-time and another date-time in terms of the specified unit.long
OffsetTime.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this time and another time in terms of the specified unit.long
Year.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this year and another year in terms of the specified unit.long
YearMonth.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this year-month and another year-month in terms of the specified unit.long
ZonedDateTime.until(Temporal endExclusive, TemporalUnit unit)
Calculates the period between this date-time and another date-time in terms of the specified unit. -
Uses of TemporalUnit in org.threeten.bp.chrono
Methods in org.threeten.bp.chrono that return types with arguments of type TemporalUnitModifier and TypeMethodDescriptionabstract List<TemporalUnit>
ChronoPeriod.getUnits()
Gets the set of units supported by this period.Methods in org.threeten.bp.chrono with parameters of type TemporalUnitModifier and TypeMethodDescriptionabstract long
ChronoPeriod.get(TemporalUnit unit)
Gets the value of the requested unit.boolean
ChronoLocalDate.isSupported(TemporalUnit unit)
ChronoLocalDate.minus(long amountToSubtract, TemporalUnit unit)
ChronoLocalDateTime.minus(long amountToSubtract, TemporalUnit unit)
ChronoZonedDateTime.minus(long amountToSubtract, TemporalUnit unit)
HijrahDate.minus(long amountToAdd, TemporalUnit unit)
JapaneseDate.minus(long amountToAdd, TemporalUnit unit)
MinguoDate.minus(long amountToAdd, TemporalUnit unit)
ThaiBuddhistDate.minus(long amountToAdd, TemporalUnit unit)
abstract ChronoLocalDate
ChronoLocalDate.plus(long amountToAdd, TemporalUnit unit)
abstract ChronoLocalDateTime<D>
ChronoLocalDateTime.plus(long amountToAdd, TemporalUnit unit)
abstract ChronoZonedDateTime<D>
ChronoZonedDateTime.plus(long amountToAdd, TemporalUnit unit)
HijrahDate.plus(long amountToAdd, TemporalUnit unit)
JapaneseDate.plus(long amountToAdd, TemporalUnit unit)
MinguoDate.plus(long amountToAdd, TemporalUnit unit)
ThaiBuddhistDate.plus(long amountToAdd, TemporalUnit unit)
-
Uses of TemporalUnit in org.threeten.bp.temporal
Classes in org.threeten.bp.temporal that implement TemporalUnitFields in org.threeten.bp.temporal declared as TemporalUnitModifier and TypeFieldDescriptionstatic TemporalUnit
IsoFields.QUARTER_YEARS
Unit that represents the concept of a quarter-year.static TemporalUnit
IsoFields.WEEK_BASED_YEARS
The unit that represents week-based-years for the purpose of addition and subtraction.Methods in org.threeten.bp.temporal that return TemporalUnitModifier and TypeMethodDescriptionChronoField.getBaseUnit()
TemporalField.getBaseUnit()
Gets the unit that the field is measured in.ChronoField.getRangeUnit()
TemporalField.getRangeUnit()
Gets the range that the field is bound by.Methods in org.threeten.bp.temporal that return types with arguments of type TemporalUnitModifier and TypeMethodDescriptionTemporalAmount.getUnits()
Gets the list of units, from largest to smallest, that fully define this amount.static TemporalQuery<TemporalUnit>
TemporalQueries.precision()
A query for the smallest supported unit.Methods in org.threeten.bp.temporal with parameters of type TemporalUnitModifier and TypeMethodDescriptionlong
TemporalAmount.get(TemporalUnit unit)
Gets the amount associated with the specified 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.plus(long amountToAdd, TemporalUnit unit)
Returns an object of the same type as this object with the specified period added.long
Temporal.until(Temporal endTemporal, TemporalUnit unit)
Calculates the period between this temporal and another temporal in terms of the specified unit.