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.
|
java.time.temporal |
Access to date and time using fields and units, and date time adjusters.
|
Modifier and Type | Class | Description |
---|---|---|
class |
Duration |
A time-based amount of time, such as '34.5 seconds'.
|
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 | Description |
---|---|---|
static Duration |
Duration.from(TemporalAmount amount) |
Obtains an instance of
Duration from a temporal amount. |
static Period |
Period.from(TemporalAmount amount) |
Obtains an instance of
Period from a temporal amount. |
Instant |
Instant.minus(TemporalAmount amountToSubtract) |
Returns a copy of this instant with the specified amount subtracted.
|
LocalDate |
LocalDate.minus(TemporalAmount amountToSubtract) |
Returns a copy of this date with the specified amount subtracted.
|
LocalDateTime |
LocalDateTime.minus(TemporalAmount amountToSubtract) |
Returns a copy of this date-time with the specified amount subtracted.
|
LocalTime |
LocalTime.minus(TemporalAmount amountToSubtract) |
Returns a copy of this time with the specified amount subtracted.
|
OffsetDateTime |
OffsetDateTime.minus(TemporalAmount amountToSubtract) |
Returns a copy of this date-time with the specified amount subtracted.
|
OffsetTime |
OffsetTime.minus(TemporalAmount amountToSubtract) |
Returns a copy of this time with the specified amount subtracted.
|
Period |
Period.minus(TemporalAmount amountToSubtract) |
Returns a copy of this period with the specified period subtracted.
|
Year |
Year.minus(TemporalAmount amountToSubtract) |
Returns a copy of this year with the specified amount subtracted.
|
YearMonth |
YearMonth.minus(TemporalAmount amountToSubtract) |
Returns a copy of this year-month with the specified amount subtracted.
|
ZonedDateTime |
ZonedDateTime.minus(TemporalAmount amountToSubtract) |
Returns a copy of this date-time with the specified amount subtracted.
|
Instant |
Instant.plus(TemporalAmount amountToAdd) |
Returns a copy of this instant with the specified amount added.
|
LocalDate |
LocalDate.plus(TemporalAmount amountToAdd) |
Returns a copy of this date with the specified amount added.
|
LocalDateTime |
LocalDateTime.plus(TemporalAmount amountToAdd) |
Returns a copy of this date-time with the specified amount added.
|
LocalTime |
LocalTime.plus(TemporalAmount amountToAdd) |
Returns a copy of this time with the specified amount added.
|
OffsetDateTime |
OffsetDateTime.plus(TemporalAmount amountToAdd) |
Returns a copy of this date-time with the specified amount added.
|
OffsetTime |
OffsetTime.plus(TemporalAmount amountToAdd) |
Returns a copy of this time with the specified amount added.
|
Period |
Period.plus(TemporalAmount amountToAdd) |
Returns a copy of this period with the specified period added.
|
Year |
Year.plus(TemporalAmount amountToAdd) |
Returns a copy of this year with the specified amount added.
|
YearMonth |
YearMonth.plus(TemporalAmount amountToAdd) |
Returns a copy of this year-month with the specified amount added.
|
ZonedDateTime |
ZonedDateTime.plus(TemporalAmount amountToAdd) |
Returns a copy of this date-time with the specified amount added.
|
Modifier and Type | Interface | Description |
---|---|---|
interface |
ChronoPeriod |
A date-based amount of time, such as '3 years, 4 months and 5 days' in an
arbitrary chronology, intended for advanced globalization use cases.
|
Modifier and Type | Method | Description |
---|---|---|
default ChronoLocalDate |
ChronoLocalDate.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
default ChronoLocalDateTime<D> |
ChronoLocalDateTime.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
ChronoPeriod |
ChronoPeriod.minus(TemporalAmount amountToSubtract) |
Returns a copy of this period with the specified period subtracted.
|
default ChronoZonedDateTime<D> |
ChronoZonedDateTime.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
HijrahDate |
HijrahDate.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
JapaneseDate |
JapaneseDate.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
MinguoDate |
MinguoDate.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
ThaiBuddhistDate |
ThaiBuddhistDate.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
default ChronoLocalDate |
ChronoLocalDate.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
default ChronoLocalDateTime<D> |
ChronoLocalDateTime.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
ChronoPeriod |
ChronoPeriod.plus(TemporalAmount amountToAdd) |
Returns a copy of this period with the specified period added.
|
default ChronoZonedDateTime<D> |
ChronoZonedDateTime.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
HijrahDate |
HijrahDate.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
JapaneseDate |
JapaneseDate.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
MinguoDate |
MinguoDate.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
ThaiBuddhistDate |
ThaiBuddhistDate.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
Modifier and Type | Method | Description |
---|---|---|
default Temporal |
Temporal.minus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount subtracted.
|
default Temporal |
Temporal.plus(TemporalAmount amount) |
Returns an object of the same type as this object with an amount added.
|
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, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps