Uses of Class
org.threeten.bp.Instant
Packages that use Instant
Package
Description
The main API for dates, times, instants, and durations.
Support for calendar systems other than the default ISO.
Support for time-zones and their rules.
-
Uses of Instant in org.threeten.bp
Fields in org.threeten.bp declared as InstantModifier and TypeFieldDescriptionstatic Instant
Instant.EPOCH
Constant for the 1970-01-01T00:00:00Z epoch instant.static Instant
Instant.MAX
The maximum supportedInstant
, '1000000000-12-31T23:59:59.999999999Z'.static Instant
Instant.MIN
The minimum supportedInstant
, '-1000000000-01-01T00:00Z'.Fields in org.threeten.bp with type parameters of type InstantModifier and TypeFieldDescriptionstatic TemporalQuery<Instant>
Instant.FROM
Simulate JDK 8 method reference Instant::from.Methods in org.threeten.bp that return InstantModifier and TypeMethodDescriptionstatic Instant
Instant.from(TemporalAccessor temporal)
Obtains an instance ofInstant
from a temporal object.abstract Instant
Clock.instant()
Gets the current instant of the clock.Instant.minus(long amountToSubtract, TemporalUnit unit)
Returns an object of the same type as this object with the specified period subtracted.Instant.minus(TemporalAmount amount)
Returns an object of the same type as this object with an amount subtracted.Instant.minusMillis(long millisToSubtract)
Returns a copy of this instant with the specified duration in milliseconds subtracted.Instant.minusNanos(long nanosToSubtract)
Returns a copy of this instant with the specified duration in nanoseconds subtracted.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 clock.static Instant
Obtains the current instant from the specified clock.static Instant
Instant.ofEpochMilli(long epochMilli)
Obtains an instance ofInstant
using milliseconds from the epoch of 1970-01-01T00:00:00Z.static Instant
Instant.ofEpochSecond(long epochSecond)
Obtains an instance ofInstant
using seconds from the epoch of 1970-01-01T00:00:00Z.static Instant
Instant.ofEpochSecond(long epochSecond, long nanoAdjustment)
Obtains an instance ofInstant
using seconds from the epoch of 1970-01-01T00:00:00Z and nanosecond fraction of second.static Instant
Instant.parse(CharSequence text)
Obtains an instance ofInstant
from a text string such as2007-12-23T10:15:30.000Z
.Instant.plus(long amountToAdd, TemporalUnit unit)
Returns an object of the same type as this object with the specified period added.Instant.plus(TemporalAmount amount)
Returns an object of the same type as this object with an amount added.Instant.plusMillis(long millisToAdd)
Returns a copy of this instant with the specified duration in milliseconds added.Instant.plusNanos(long nanosToAdd)
Returns a copy of this instant with the specified duration in nanoseconds added.Instant.plusSeconds(long secondsToAdd)
Returns a copy of this instant with the specified duration in seconds added.OffsetDateTime.toInstant()
Converts this date-time to anInstant
.Instant.truncatedTo(TemporalUnit unit)
Returns a copy of thisInstant
truncated to the specified unit.Instant.with(TemporalAdjuster adjuster)
Returns an adjusted copy of this instant.Instant.with(TemporalField field, long newValue)
Returns a copy of this instant with the specified field set to a new value.Methods in org.threeten.bp with parameters of type InstantModifier and TypeMethodDescriptionint
Compares this instant to the specified instant.static Clock
Obtains a clock that always returns the same instant.boolean
Checks if this instant is after the specified instant.boolean
Checks if this instant is before the specified instant.static LocalDateTime
Obtains an instance ofLocalDateTime
from anInstant
and zone ID.static OffsetDateTime
Obtains an instance ofOffsetDateTime
from anInstant
and zone ID.static OffsetTime
Obtains an instance ofOffsetTime
from anInstant
and zone ID.static ZonedDateTime
Obtains an instance ofZonedDateTime
from anInstant
. -
Uses of Instant in org.threeten.bp.chrono
Methods in org.threeten.bp.chrono that return InstantModifier and TypeMethodDescriptionChronoLocalDateTime.toInstant(ZoneOffset offset)
Converts this date-time to anInstant
.ChronoZonedDateTime.toInstant()
Converts this date-time to anInstant
.Methods in org.threeten.bp.chrono with parameters of type InstantModifier and TypeMethodDescriptionChronology.zonedDateTime(Instant instant, ZoneId zone)
Obtains a zoned date-time in this chronology from anInstant
.HijrahChronology.zonedDateTime(Instant instant, ZoneId zone)
IsoChronology.zonedDateTime(Instant instant, ZoneId zone)
Obtains an ISO zoned date-time from an instant.JapaneseChronology.zonedDateTime(Instant instant, ZoneId zone)
MinguoChronology.zonedDateTime(Instant instant, ZoneId zone)
ThaiBuddhistChronology.zonedDateTime(Instant instant, ZoneId zone)
-
Uses of Instant in org.threeten.bp.zone
Methods in org.threeten.bp.zone that return InstantMethods in org.threeten.bp.zone with parameters of type InstantModifier and TypeMethodDescriptionabstract Duration
ZoneRules.getDaylightSavings(Instant instant)
Gets the amount of daylight savings in use for the specified instant in this zone.abstract ZoneOffset
Gets the offset applicable at the specified instant in these rules.abstract ZoneOffset
ZoneRules.getStandardOffset(Instant instant)
Gets the standard offset for the specified instant in this zone.abstract boolean
ZoneRules.isDaylightSavings(Instant instant)
Checks if the specified instant is in daylight savings.abstract ZoneOffsetTransition
ZoneRules.nextTransition(Instant instant)
Gets the next transition after the specified instant.abstract ZoneOffsetTransition
ZoneRules.previousTransition(Instant instant)
Gets the previous transition before the specified instant.