Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public interface Temporal
ExtendsTemporalAccessor
Known subtypesInstant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, ZonedDateTime, ChronoLocalDate, ChronoLocalDateTime, ChronoZonedDateTime
A date, a time or a moment that can be moved by an amount of time and
measured against another of its kind.
Methods
public abstract boolean isSupported(TemporalUnit unit) | Whether this value can add or subtract unit. |
public abstract Temporal plus(long amountToAdd, TemporalUnit unit) | This value moved forward by amountToAdd of unit. |
public default Temporal minus(long amountToSubtract, TemporalUnit unit) | This value moved back by amountToSubtract of unit. |
public default Temporal plus(TemporalAmount amount) | This value moved forward by amount. |
public default Temporal minus(TemporalAmount amount) | This value moved back by amount. |
public abstract long until(Temporal endExclusive, TemporalUnit unit) | The whole units of unit from this value to endExclusive. |
Method details
isSupported
public abstract boolean isSupported(TemporalUnit unit)Whether this value can add or subtract
unit.plus
public abstract Temporal plus(long amountToAdd, TemporalUnit unit)This value moved forward by
amountToAdd of unit.minus
public default Temporal minus(long amountToSubtract, TemporalUnit unit)This value moved back by
amountToSubtract of unit.plus
public default Temporal plus(TemporalAmount amount)This value moved forward by
amount.minus
public default Temporal minus(TemporalAmount amount)This value moved back by
amount.until
public abstract long until(Temporal endExclusive, TemporalUnit unit)The whole units of
unit from this value to endExclusive.