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 TypeMethodDescriptionlongDuration.get(TemporalUnit unit) longPeriod.get(TemporalUnit unit) booleanInstant.isSupported(TemporalUnit unit) booleanLocalDateTime.isSupported(TemporalUnit unit) booleanLocalTime.isSupported(TemporalUnit unit) booleanOffsetDateTime.isSupported(TemporalUnit unit) booleanOffsetTime.isSupported(TemporalUnit unit) booleanYear.isSupported(TemporalUnit unit) booleanYearMonth.isSupported(TemporalUnit unit) booleanZonedDateTime.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 DurationDuration.of(long amount, TemporalUnit unit) Obtains an instance ofDurationfrom 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 thisInstanttruncated to the specified unit.LocalDateTime.truncatedTo(TemporalUnit unit) Returns a copy of thisLocalDateTimewith the time truncated.LocalTime.truncatedTo(TemporalUnit unit) Returns a copy of thisLocalTimewith the time truncated.OffsetDateTime.truncatedTo(TemporalUnit unit) Returns a copy of thisOffsetDateTimewith the time truncated.OffsetTime.truncatedTo(TemporalUnit unit) Returns a copy of thisOffsetTimewith the time truncated.ZonedDateTime.truncatedTo(TemporalUnit unit) Returns a copy of thisZonedDateTimewith the time truncated.longInstant.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this instant and another instant in terms of the specified unit.longLocalDate.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this date and another date in terms of the specified unit.longLocalDateTime.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this date-time and another date-time in terms of the specified unit.longLocalTime.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this time and another time in terms of the specified unit.longOffsetDateTime.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this date-time and another date-time in terms of the specified unit.longOffsetTime.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this time and another time in terms of the specified unit.longYear.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this year and another year in terms of the specified unit.longYearMonth.until(Temporal endExclusive, TemporalUnit unit) Calculates the period between this year-month and another year-month in terms of the specified unit.longZonedDateTime.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 longChronoPeriod.get(TemporalUnit unit) Gets the value of the requested unit.booleanChronoLocalDate.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 ChronoLocalDateChronoLocalDate.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 final TemporalUnitIsoFields.QUARTER_YEARSUnit that represents the concept of a quarter-year.static final TemporalUnitIsoFields.WEEK_BASED_YEARSThe 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 TypeMethodDescriptionlongTemporalAmount.get(TemporalUnit unit) Gets the amount associated with the specified unit.booleanTemporal.isSupported(TemporalUnit unit) Checks if the specified unit is supported.default TemporalTemporal.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.longTemporal.until(Temporal endTemporal, TemporalUnit unit) Calculates the period between this temporal and another temporal in terms of the specified unit.