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 Period
CalendricalMerger.overflow
The overflow period to be added to the resultant date/time.static final Period
Period.ZERO
A constant for a period of zero.Methods in javax.time.calendar that return PeriodModifier and TypeMethodDescriptionstatic Period
Period.between
(DateProvider startDateProvider, DateProvider endDateProvider) Obtains aPeriod
consisting of the number of days, months and years between two dates.static Period
Period.daysBetween
(DateProvider startDateProvider, DateProvider endDateProvider) Obtains aPeriod
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 aPeriod
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.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 Period
Period.of
(int years, int months, int days, int hours, int minutes, int seconds) Obtains aPeriod
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 aPeriod
from date-based and time-based fields.static Period
Period.of
(int amount, PeriodUnit unit) Obtains aPeriod
from an amount and unit.static Period
Period.of
(PeriodProvider periodProvider) Obtains aPeriod
from a provider of periods.static Period
Obtains aPeriod
from aDuration
.static Period
Period.ofDateFields
(int years, int months, int days) Obtains aPeriod
from date-based fields.static Period
Period.ofDateFields
(PeriodProvider periodProvider) Obtains aPeriod
from the date-based fields of a period.static Period
Period.ofDays
(int days) Obtains aPeriod
from a number of days.static Period
Period.ofHours
(int hours) Obtains aPeriod
from a number of hours.static Period
Period.ofMinutes
(int minutes) Obtains aPeriod
from a number of minutes.static Period
Period.ofMonths
(int months) Obtains aPeriod
from a number of months.static Period
Period.ofNanos
(long nanos) Obtains aPeriod
from a number of nanoseconds.static Period
Period.ofSeconds
(int seconds) Obtains aPeriod
from a number of seconds.static Period
Period.ofTimeFields
(int hours, int minutes, int seconds) Obtains aPeriod
from time-based fields.static Period
Period.ofTimeFields
(int hours, int minutes, int seconds, long nanos) Obtains aPeriod
from time-based fields.static Period
Period.ofTimeFields
(PeriodProvider periodProvider) Obtains aPeriod
from the time-based fields of a period.static Period
Period.ofYears
(int years) Obtains aPeriod
from a number of years.static Period
Obtains aPeriod
from a text string such asPnYnMnDTnHnMn.nS
.(package private) Period
Obtains an instance ofPeriod
from 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) Period
PeriodParser.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 Period
Period.yearsBetween
(DateProvider startDateProvider, DateProvider endDateProvider) Obtains aPeriod
consisting of the number of years between two dates.Methods in javax.time.calendar with parameters of type PeriodModifier and TypeMethodDescriptionvoid
CalendricalMerger.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 Period
ZoneRulesBuilder.TZWindow.fixedSavingAmount
The fixed amount of the saving to be applied during this window.(package private) Period
TZDBZoneRulesCompiler.TZDBZone.fixedSavings
The fixed savings amount.private Period
ZoneRulesBuilder.TZRule.savingAmount
The amount of the saving to be applied after this point.(package private) Period
TZDBZoneRulesCompiler.TZDBRule.savingsAmount
The 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 Period
TZDBZoneRulesCompiler.parsePeriod
(String str) Methods in javax.time.calendar.zone with parameters of type PeriodModifier and TypeMethodDescription(package private) void
ZoneRulesBuilder.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) OffsetDateTime
ZoneRulesBuilder.TZWindow.createDateTime
(Period savings) Creates the offset date-time for the local date-time at the end of the window.(package private) void
ZoneRulesBuilder.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) ZoneOffsetTransition
ZoneRulesBuilder.TZRule.toTransition
(ZoneOffset standardOffset, Period savingsBefore) Converts this to a transition.(package private) ZoneOffsetTransitionRule
ZoneRulesBuilder.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.