Uses of Class
javax.time.calendar.Period

Packages that use Period
Package
Description
Provides classes to manage the human time scale including date, time, date-time and time-zone representations.
Provides classes to implement time-zones and their rules.
  • Uses of Period in javax.time.calendar

    Fields in javax.time.calendar declared as Period
    Modifier and Type
    Field
    Description
    static final Period
    Period.ZERO
    A constant for a period of zero.
    Methods in javax.time.calendar that return Period
    Modifier and Type
    Method
    Description
    static Period
    Period.between(DateProvider startDateProvider, DateProvider endDateProvider)
    Obtains a Period consisting of the number of days, months and years between two dates.
    static Period
    Period.daysBetween(DateProvider startDateProvider, DateProvider endDateProvider)
    Obtains a Period consisting of the number of days between two dates.
    Period.dividedBy(int divisor)
    Returns a new instance with each element in this period divided by the specified value.
    CalendricalMerger.getOverflow()
    Gets the overflow that results from the merge.
    Period.minus(PeriodProvider periodProvider)
    Returns a copy of this period with the specified period subtracted.
    Period.minusDays(int days)
    Returns a copy of this period with the specified number of days subtracted.
    Period.minusHours(int hours)
    Returns a copy of this period with the specified number of hours subtracted.
    Period.minusMinutes(int minutes)
    Returns a copy of this period with the specified number of minutes subtracted.
    Period.minusMonths(int months)
    Returns a copy of this period with the specified number of months subtracted.
    Period.minusNanos(long nanos)
    Returns a copy of this period with the specified number of nanoseconds subtracted.
    Period.minusSeconds(int seconds)
    Returns a copy of this period with the specified number of seconds subtracted.
    Period.minusYears(int years)
    Returns a copy of this period with the specified number of years subtracted.
    static Period
    Period.monthsBetween(DateProvider startDateProvider, DateProvider endDateProvider)
    Obtains a Period consisting of the number of months between two dates.
    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 all amounts normalized to the standard ranges for date-time fields.
    Returns a copy of this period with all amounts normalized to the standard ranges for date-time fields including the assumption that days are 24 hours long.
    static Period
    Period.of(int years, int months, int days, int hours, int minutes, int seconds)
    Obtains a Period from date-based and time-based fields.
    static Period
    Period.of(int years, int months, int days, int hours, int minutes, int seconds, long nanos)
    Obtains a Period from date-based and time-based fields.
    static Period
    Period.of(int amount, PeriodUnit unit)
    Obtains a Period from an amount and unit.
    static Period
    Period.of(PeriodProvider periodProvider)
    Obtains a Period from a provider of periods.
    static Period
    Period.of(Duration duration)
    Obtains a Period from a Duration.
    static Period
    Period.ofDateFields(int years, int months, int days)
    Obtains a Period from date-based fields.
    static Period
    Period.ofDateFields(PeriodProvider periodProvider)
    Obtains a Period from the date-based fields of a period.
    static Period
    Period.ofDays(int days)
    Obtains a Period from a number of days.
    static Period
    Period.ofHours(int hours)
    Obtains a Period from a number of hours.
    static Period
    Period.ofMinutes(int minutes)
    Obtains a Period from a number of minutes.
    static Period
    Period.ofMonths(int months)
    Obtains a Period from a number of months.
    static Period
    Period.ofNanos(long nanos)
    Obtains a Period from a number of nanoseconds.
    static Period
    Period.ofSeconds(int seconds)
    Obtains a Period from a number of seconds.
    static Period
    Period.ofTimeFields(int hours, int minutes, int seconds)
    Obtains a Period from time-based fields.
    static Period
    Period.ofTimeFields(int hours, int minutes, int seconds, long nanos)
    Obtains a Period from time-based fields.
    static Period
    Period.ofTimeFields(PeriodProvider periodProvider)
    Obtains a Period from the time-based fields of a period.
    static Period
    Period.ofYears(int years)
    Obtains a Period from a number of years.
    static Period
    Period.parse(String text)
    Obtains a Period from a text string such as PnYnMnDTnHnMn.nS.
    Period.plus(PeriodProvider periodProvider)
    Returns a copy of this period with the specified period added.
    Period.plusDays(int days)
    Returns a copy of this period with the specified number of days added.
    Period.plusHours(int hours)
    Returns a copy of this period with the specified number of hours added.
    Period.plusMinutes(int minutes)
    Returns a copy of this period with the specified number of minutes added.
    Period.plusMonths(int months)
    Returns a copy of this period with the specified number of months added.
    Period.plusNanos(long nanos)
    Returns a copy of this period with the specified number of nanoseconds added.
    Period.plusSeconds(int seconds)
    Returns a copy of this period with the specified number of seconds added.
    Period.plusYears(int years)
    Returns a copy of this period with the specified number of years added.
    ZoneOffset.toPeriod()
    Converts this offset to a period.
    Returns a copy of this period with only the date-based fields retained.
    Period.withDays(int days)
    Returns a copy of this period with the specified amount of days.
    Period.withHours(int hours)
    Returns a copy of this period with the specified amount of hours.
    Period.withMinutes(int minutes)
    Returns a copy of this period with the specified amount of minutes.
    Period.withMonths(int months)
    Returns a copy of this period with the specified amount of months.
    Period.withNanos(long nanos)
    Returns a copy of this period with the specified amount of nanoseconds.
    Period.withSeconds(int seconds)
    Returns a copy of this period with the specified amount of seconds.
    Returns a copy of this period with only the time-based fields retained.
    Period.withYears(int years)
    Returns a copy of this period with the specified amount of years.
    static Period
    Period.yearsBetween(DateProvider startDateProvider, DateProvider endDateProvider)
    Obtains a Period consisting of the number of years between two dates.
    Methods in javax.time.calendar with parameters of type Period
    Modifier and Type
    Method
    Description
    void
    CalendricalMerger.addToOverflow(Period additionalOverflow)
    Gets the overflow that results from the merge.
  • Uses of Period in javax.time.calendar.zone

    Methods in javax.time.calendar.zone that return Period
    Modifier and Type
    Method
    Description
    ZoneRules.getDaylightSavings(InstantProvider instantProvider)
    Gets the amount of daylight savings in use for the specified instant in this zone.
    ZoneOffsetTransition.getTransitionSize()
    Gets the length of the transition as a Period.
    Methods in javax.time.calendar.zone with parameters of type Period
    Modifier and Type
    Method
    Description
    ZoneRulesBuilder.addRuleToWindow(int startYear, int endYear, MonthOfYear month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAmount)
    Adds a multi-year transition rule to the current window.
    ZoneRulesBuilder.addRuleToWindow(int year, MonthOfYear month, int dayOfMonthIndicator, LocalTime time, boolean timeEndOfDay, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAmount)
    Adds a single transition rule to the current window.
    ZoneRulesBuilder.addRuleToWindow(LocalDateTime dateTime, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAmount)
    Adds a single transition rule to the current window.
    ZoneRulesBuilder.setFixedSavingsToWindow(Period fixedSavingAmount)
    Sets the previously added window to have fixed savings.