Package | Description |
---|---|
javax.time |
Provides classes to manage the continuous time scale including a wrapper
for the system clock.
|
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 | Description |
---|---|---|
static Instant |
Instant.EPOCH |
Constant for the 1970-01-01T00:00:00Z epoch instant.
|
Modifier and Type | Method | Description |
---|---|---|
protected Instant |
UTCRules.convertToInstant(UTCInstant utcInstant) |
Converts a
UTCInstant to an Instant . |
abstract Instant |
TimeSource.instant() |
Gets the current
Instant . |
Instant |
Instant.minus(long amount,
TimeUnit unit) |
Returns a copy of this duration with the specified duration subtracted.
|
Instant |
Instant.minus(Duration duration) |
Returns a copy of this instant with the specified duration subtracted.
|
Instant |
Instant.minusMillis(long millisToSubtract) |
Returns a copy of this instant with the specified duration in milliseconds subtracted.
|
Instant |
Instant.minusNanos(long nanosToSubtract) |
Returns a copy of this instant with the specified duration in nanoseconds subtracted.
|
Instant |
Instant.minusSeconds(long secondsToSubtract) |
Returns a copy of this instant with the specified duration in seconds subtracted.
|
static Instant |
Instant.now() |
Obtains the current instant from the system time-source in the default time-zone.
|
static Instant |
Instant.now(TimeSource timeSource) |
Obtains the current instant from the specified clock.
|
static Instant |
Instant.of(InstantProvider instantProvider) |
Obtains an instance of
Instant from a provider of instants. |
static Instant |
Instant.ofEpochMillis(long epochMillis) |
Obtains an instance of
Instant using milliseconds from the
epoch of 1970-01-01T00:00:00Z. |
static Instant |
Instant.ofEpochNanos(long epochNanos) |
Obtains an instance of
Instant using nanoseconds from the
epoch of 1970-01-01T00:00:00Z. |
static Instant |
Instant.ofEpochNanos(BigInteger epochNanos) |
Obtains an instance of
Instant using nanoseconds from the
epoch of 1970-01-01T00:00:00Z. |
static Instant |
Instant.ofEpochSeconds(long epochSeconds) |
Obtains an instance of
Instant using seconds from the
epoch of 1970-01-01T00:00:00Z. |
static Instant |
Instant.ofEpochSeconds(long epochSeconds,
long nanoAdjustment) |
Obtains an instance of
Instant using seconds from the
epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second. |
static Instant |
Instant.ofEpochSeconds(BigDecimal epochSeconds) |
Obtains an instance of
Instant using seconds from the
epoch of 1970-01-01T00:00:00Z. |
static Instant |
Instant.parse(String text) |
Obtains an instance of
Instant by parsing a string. |
Instant |
Instant.plus(long amount,
TimeUnit unit) |
Returns a copy of this duration with the specified duration added.
|
Instant |
Instant.plus(Duration duration) |
Returns a copy of this instant with the specified duration added.
|
Instant |
Instant.plusMillis(long millisToAdd) |
Returns a copy of this instant with the specified duration in milliseconds added.
|
Instant |
Instant.plusNanos(long nanosToAdd) |
Returns a copy of this instant with the specified duration in nanoseconds added.
|
Instant |
Instant.plusSeconds(long secondsToAdd) |
Returns a copy of this instant with the specified duration in seconds added.
|
Instant |
Instant.toInstant() |
Converts this instant to an
Instant , trivially returning this . |
Instant |
InstantProvider.toInstant() |
Returns an instance of
Instant initialized from the
state of this object. |
Instant |
TAIInstant.toInstant() |
Converts this instant to an
Instant using the system default
leap second rules. |
Instant |
UTCInstant.toInstant() |
Converts this instant to an
Instant using the system default
leap second rules. |
Modifier and Type | Method | Description |
---|---|---|
int |
Instant.compareTo(Instant otherInstant) |
Compares this instant to the specified instant.
|
protected UTCInstant |
UTCRules.convertToUTC(Instant instant) |
Converts an
Instant to a UTCInstant . |
boolean |
Instant.isAfter(Instant otherInstant) |
Checks if this instant is after the specified instant.
|
boolean |
Instant.isBefore(Instant otherInstant) |
Checks if this instant is before the specified instant.
|
static TAIInstant |
TAIInstant.of(Instant instant) |
Obtains an instance of
TAIInstant from an Instant
using the system default leap second rules. |
static UTCInstant |
UTCInstant.of(Instant instant) |
Obtains an instance of
UTCInstant from a provider of instants
using the system default leap second rules. |
static UTCInstant |
UTCInstant.of(Instant instant,
UTCRules rules) |
Obtains an instance of
UTCInstant from a provider of instants
using the specified leap second rules. |
Modifier and Type | Method | Description |
---|---|---|
Instant |
Clock.instant() |
Gets the current instant.
|
Instant |
OffsetDate.toInstant() |
Converts this date to an
Instant at midnight. |
Instant |
OffsetDateTime.toInstant() |
Converts this date-time to an
Instant . |
Instant |
ZonedDateTime.toInstant() |
Converts this
ZonedDateTime to an Instant . |
Modifier and Type | Method | Description |
---|---|---|
Instant |
ZoneOffsetTransition.getInstant() |
Gets the transition instant.
|
Modifier and Type | Method | Description |
---|---|---|
ZoneOffsetInfo |
ZoneRules.getOffsetInfo(Instant instant) |
Gets the offset information for the specified instant in this zone.
|
Copyright © 2019. All rights reserved.