Uses of Class
org.threeten.bp.Period
Packages that use Period
Package
Description
The main API for dates, times, instants, and durations.
Provides classes to print and parse dates and times.
-
Uses of Period in org.threeten.bp
Fields in org.threeten.bp declared as PeriodModifier and TypeFieldDescriptionstatic final PeriodPeriod.ZEROA constant for a period of zero.Methods in org.threeten.bp that return PeriodModifier and TypeMethodDescriptionstatic PeriodObtains aPeriodconsisting of the number of years, months, and days between two dates.static PeriodPeriod.from(TemporalAmount amount) Obtains an instance ofPeriodfrom a temporal amount.Period.minus(TemporalAmount amountToSubtract) Returns a copy of this period with the specified amount subtracted.Period.minusDays(long daysToSubtract) Returns a copy of this period with the specified days subtracted.Period.minusMonths(long monthsToSubtract) Returns a copy of this period with the specified months subtracted.Period.minusYears(long yearsToSubtract) Returns a copy of this period with the specified years subtracted.Period.multipliedBy(int scalar) Returns a new instance with each element in this period multiplied by the specified scalar.Period.negated()Returns a new instance with each amount in this period negated.Period.normalized()Returns a copy of this period with the years and months normalized using a 12 month year.static PeriodPeriod.of(int years, int months, int days) Obtains aPeriodrepresenting a number of years, months and days.static PeriodPeriod.ofDays(int days) Obtains aPeriodrepresenting a number of days.static PeriodPeriod.ofMonths(int months) Obtains aPeriodrepresenting a number of months.static PeriodPeriod.ofWeeks(int weeks) Obtains aPeriodrepresenting a number of weeks.static PeriodPeriod.ofYears(int years) Obtains aPeriodrepresenting a number of years.static PeriodPeriod.parse(CharSequence text) Obtains aPeriodfrom a text string such asPnYnMnD.Period.plus(TemporalAmount amountToAdd) Returns a copy of this period with the specified amount added.Period.plusDays(long daysToAdd) Returns a copy of this period with the specified days added.Period.plusMonths(long monthsToAdd) Returns a copy of this period with the specified months added.Period.plusYears(long yearsToAdd) Returns a copy of this period with the specified years added.LocalDate.until(ChronoLocalDate endDate) Calculates the period between this date and another date as aPeriod.Period.withDays(int days) Returns a copy of this period with the specified amount of days.Period.withMonths(int months) Returns a copy of this period with the specified amount of months.Period.withYears(int years) Returns a copy of this period with the specified amount of years. -
Uses of Period in org.threeten.bp.format
Methods in org.threeten.bp.format that return types with arguments of type PeriodModifier and TypeMethodDescriptionstatic TemporalQuery<Period>DateTimeFormatter.parsedExcessDays()A query that provides access to the excess days that were parsed.