Zoned

data class Zoned<out T>(val value: T, val timeZone: TimeZone)

Hodler for a generic value T that is associated with a TimeZone

Constructors

Link copied to clipboard
constructor(value: T, timeZone: TimeZone)

Properties

Link copied to clipboard
val timeZone: TimeZone
Link copied to clipboard
val value: T

Functions

Link copied to clipboard
fun <T, R> Zoned<T>.mapValue(transform: (T) -> R): Zoned<R>

Returns a new Zoned with the same Zoned.timeZone and the value returned by transform.

Link copied to clipboard
operator fun Zoned<Instant>.minus(duration: Duration): Zoned<Instant>
Link copied to clipboard
operator fun Zoned<Instant>.plus(duration: Duration): Zoned<Instant>
Link copied to clipboard
fun Zoned<Instant>.toLocalDateTime(): LocalDateTime

Returns a civil datetime value that this instant Zoned.value has in the specified Zoned.timeZone.