Package | Description |
---|---|
java.time |
The main API for dates, times, instants, and durations.
|
java.time.chrono |
Generic API for calendar systems other than the default ISO.
|
Modifier and Type | Class and Description |
---|---|
class |
Period
A date-based amount of time in the ISO-8601 calendar system,
such as '2 years, 3 months and 4 days'.
|
Modifier and Type | Method and Description |
---|---|
static ChronoPeriod |
ChronoPeriod.between(ChronoLocalDate startDateInclusive,
ChronoLocalDate endDateExclusive)
Obtains a
ChronoPeriod consisting of amount of time between two dates. |
ChronoPeriod |
ChronoPeriod.minus(TemporalAmount amountToSubtract)
Returns a copy of this period with the specified period subtracted.
|
ChronoPeriod |
ChronoPeriod.multipliedBy(int scalar)
Returns a new instance with each amount in this period in this period
multiplied by the specified scalar.
|
default ChronoPeriod |
ChronoPeriod.negated()
Returns a new instance with each amount in this period negated.
|
ChronoPeriod |
ChronoPeriod.normalized()
Returns a copy of this period with the amounts of each unit normalized.
|
default ChronoPeriod |
Chronology.period(int years,
int months,
int days)
Obtains a period for this chronology based on years, months and days.
|
ChronoPeriod |
ChronoPeriod.plus(TemporalAmount amountToAdd)
Returns a copy of this period with the specified period added.
|
ChronoPeriod |
ThaiBuddhistDate.until(ChronoLocalDate endDate) |
ChronoPeriod |
HijrahDate.until(ChronoLocalDate endDate) |
ChronoPeriod |
MinguoDate.until(ChronoLocalDate endDate) |
ChronoPeriod |
JapaneseDate.until(ChronoLocalDate endDate) |
ChronoPeriod |
ChronoLocalDate.until(ChronoLocalDate endDateExclusive)
Calculates the period between this date and another date as a
ChronoPeriod . |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.