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 PeriodModifier and TypeFieldDescriptionprivate PeriodCalendricalMerger.overflowThe overflow period to be added to the resultant date/time.static final PeriodPeriod.ZEROA constant for a period of zero.Methods in javax.time.calendar that return PeriodModifier and TypeMethodDescriptionstatic PeriodPeriod.between(DateProvider startDateProvider, DateProvider endDateProvider) Obtains aPeriodconsisting of the number of days, months and years between two dates.static PeriodPeriod.daysBetween(DateProvider startDateProvider, DateProvider endDateProvider) Obtains aPeriodconsisting 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 PeriodPeriod.monthsBetween(DateProvider startDateProvider, DateProvider endDateProvider) Obtains aPeriodconsisting 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.Period.normalizedWith24HourDays()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 PeriodPeriod.of(int years, int months, int days, int hours, int minutes, int seconds) Obtains aPeriodfrom date-based and time-based fields.static PeriodPeriod.of(int years, int months, int days, int hours, int minutes, int seconds, long nanos) Obtains aPeriodfrom date-based and time-based fields.static PeriodPeriod.of(int amount, PeriodUnit unit) Obtains aPeriodfrom an amount and unit.static PeriodPeriod.of(PeriodProvider periodProvider) Obtains aPeriodfrom a provider of periods.static PeriodObtains aPeriodfrom aDuration.static PeriodPeriod.ofDateFields(int years, int months, int days) Obtains aPeriodfrom date-based fields.static PeriodPeriod.ofDateFields(PeriodProvider periodProvider) Obtains aPeriodfrom the date-based fields of a period.static PeriodPeriod.ofDays(int days) Obtains aPeriodfrom a number of days.static PeriodPeriod.ofHours(int hours) Obtains aPeriodfrom a number of hours.static PeriodPeriod.ofMinutes(int minutes) Obtains aPeriodfrom a number of minutes.static PeriodPeriod.ofMonths(int months) Obtains aPeriodfrom a number of months.static PeriodPeriod.ofNanos(long nanos) Obtains aPeriodfrom a number of nanoseconds.static PeriodPeriod.ofSeconds(int seconds) Obtains aPeriodfrom a number of seconds.static PeriodPeriod.ofTimeFields(int hours, int minutes, int seconds) Obtains aPeriodfrom time-based fields.static PeriodPeriod.ofTimeFields(int hours, int minutes, int seconds, long nanos) Obtains aPeriodfrom time-based fields.static PeriodPeriod.ofTimeFields(PeriodProvider periodProvider) Obtains aPeriodfrom the time-based fields of a period.static PeriodPeriod.ofYears(int years) Obtains aPeriodfrom a number of years.static PeriodObtains aPeriodfrom a text string such asPnYnMnDTnHnMn.nS.(package private) PeriodObtains an instance ofPeriodfrom a string.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.(package private) PeriodPeriodParser.ParseValues.toPeriod()ZoneOffset.toPeriod()Converts this offset to a period.Period.withDateFieldsOnly()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.Period.withTimeFieldsOnly()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 PeriodPeriod.yearsBetween(DateProvider startDateProvider, DateProvider endDateProvider) Obtains aPeriodconsisting of the number of years between two dates.Methods in javax.time.calendar with parameters of type PeriodModifier and TypeMethodDescriptionvoidCalendricalMerger.addToOverflow(Period additionalOverflow) Gets the overflow that results from the merge. -
Uses of Period in javax.time.calendar.zone
Fields in javax.time.calendar.zone declared as PeriodModifier and TypeFieldDescriptionprivate PeriodZoneRulesBuilder.TZWindow.fixedSavingAmountThe fixed amount of the saving to be applied during this window.(package private) PeriodTZDBZoneRulesCompiler.TZDBZone.fixedSavingsThe fixed savings amount.private PeriodZoneRulesBuilder.TZRule.savingAmountThe amount of the saving to be applied after this point.(package private) PeriodTZDBZoneRulesCompiler.TZDBRule.savingsAmountThe amount of savings.Methods in javax.time.calendar.zone that return PeriodModifier and TypeMethodDescriptionZoneRules.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 aPeriod.private PeriodTZDBZoneRulesCompiler.parsePeriod(String str) Methods in javax.time.calendar.zone with parameters of type PeriodModifier and TypeMethodDescription(package private) voidZoneRulesBuilder.TZWindow.addRule(int startYear, int endYear, MonthOfYear month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAmount) Adds a rule to the current window.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.(package private) OffsetDateTimeZoneRulesBuilder.TZWindow.createDateTime(Period savings) Creates the offset date-time for the local date-time at the end of the window.(package private) voidZoneRulesBuilder.TZWindow.setFixedSavings(Period fixedSavingAmount) Sets the fixed savings amount for the window.ZoneRulesBuilder.setFixedSavingsToWindow(Period fixedSavingAmount) Sets the previously added window to have fixed savings.(package private) ZoneOffsetTransitionZoneRulesBuilder.TZRule.toTransition(ZoneOffset standardOffset, Period savingsBefore) Converts this to a transition.(package private) ZoneOffsetTransitionRuleZoneRulesBuilder.TZRule.toTransitionRule(ZoneOffset standardOffset, Period savingsBefore) Converts this to a transition rule.Constructors in javax.time.calendar.zone with parameters of type PeriodModifierConstructorDescription(package private)TZRule(int year, MonthOfYear month, int dayOfMonthIndicator, DayOfWeek dayOfWeek, LocalTime time, boolean timeEndOfDay, ZoneRulesBuilder.TimeDefinition timeDefinition, Period savingAfter) Constructor.