Package | Description |
---|---|
javax.time.calendar |
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
|
javax.time.calendar.zone |
Provides classes to implement time-zones and their rules.
|
Modifier and Type | Field and Description |
---|---|
static Period |
Period.ZERO
A constant for a period of zero.
|
Modifier and Type | Method and 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 |
Period.dividedBy(int divisor)
Returns a new instance with each element in this period divided
by the specified value.
|
Period |
CalendricalMerger.getOverflow()
Gets the overflow that results from the merge.
|
Period |
Period.minus(PeriodProvider periodProvider)
Returns a copy of this period with the specified period subtracted.
|
Period |
Period.minusDays(int days)
Returns a copy of this period with the specified number of days subtracted.
|
Period |
Period.minusHours(int hours)
Returns a copy of this period with the specified number of hours subtracted.
|
Period |
Period.minusMinutes(int minutes)
Returns a copy of this period with the specified number of minutes subtracted.
|
Period |
Period.minusMonths(int months)
Returns a copy of this period with the specified number of months subtracted.
|
Period |
Period.minusNanos(long nanos)
Returns a copy of this period with the specified number of nanoseconds subtracted.
|
Period |
Period.minusSeconds(int seconds)
Returns a copy of this period with the specified number of seconds subtracted.
|
Period |
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 |
Period.multipliedBy(int scalar)
Returns a new instance with each element in this period multiplied
by the specified scalar.
|
Period |
Period.negated()
Returns a new instance with each amount in this period negated.
|
Period |
Period.normalized()
Returns a copy of this period with all amounts normalized to the
standard ranges for date-time fields.
|
Period |
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(Duration duration)
Obtains a
Period from a Duration . |
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.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 |
Period.plus(PeriodProvider periodProvider)
Returns a copy of this period with the specified period added.
|
Period |
Period.plusDays(int days)
Returns a copy of this period with the specified number of days added.
|
Period |
Period.plusHours(int hours)
Returns a copy of this period with the specified number of hours added.
|
Period |
Period.plusMinutes(int minutes)
Returns a copy of this period with the specified number of minutes added.
|
Period |
Period.plusMonths(int months)
Returns a copy of this period with the specified number of months added.
|
Period |
Period.plusNanos(long nanos)
Returns a copy of this period with the specified number of nanoseconds added.
|
Period |
Period.plusSeconds(int seconds)
Returns a copy of this period with the specified number of seconds added.
|
Period |
Period.plusYears(int years)
Returns a copy of this period with the specified number of years added.
|
Period |
ZoneOffset.toPeriod()
Converts this offset to a period.
|
Period |
Period.withDateFieldsOnly()
Returns a copy of this period with only the date-based fields retained.
|
Period |
Period.withDays(int days)
Returns a copy of this period with the specified amount of days.
|
Period |
Period.withHours(int hours)
Returns a copy of this period with the specified amount of hours.
|
Period |
Period.withMinutes(int minutes)
Returns a copy of this period with the specified amount of minutes.
|
Period |
Period.withMonths(int months)
Returns a copy of this period with the specified amount of months.
|
Period |
Period.withNanos(long nanos)
Returns a copy of this period with the specified amount of nanoseconds.
|
Period |
Period.withSeconds(int seconds)
Returns a copy of this period with the specified amount of seconds.
|
Period |
Period.withTimeFieldsOnly()
Returns a copy of this period with only the time-based fields retained.
|
Period |
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. |
Modifier and Type | Method and Description |
---|---|
void |
CalendricalMerger.addToOverflow(Period additionalOverflow)
Gets the overflow that results from the merge.
|
Modifier and Type | Method and Description |
---|---|
Period |
ZoneRules.getDaylightSavings(InstantProvider instantProvider)
Gets the amount of daylight savings in use for the specified instant in this zone.
|
Period |
ZoneOffsetTransition.getTransitionSize()
Gets the length of the transition as a
Period . |
Modifier and Type | Method and Description |
---|---|
ZoneRulesBuilder |
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 |
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 |
ZoneRulesBuilder.addRuleToWindow(LocalDateTime dateTime,
ZoneRulesBuilder.TimeDefinition timeDefinition,
Period savingAmount)
Adds a single transition rule to the current window.
|
ZoneRulesBuilder |
ZoneRulesBuilder.setFixedSavingsToWindow(Period fixedSavingAmount)
Sets the previously added window to have fixed savings.
|
Copyright © 2014. All rights reserved.