Companion

object Companion

Functions

fromMillisecondOfUnixEpoch
Link copied to clipboard
common
fun fromMillisecondOfUnixEpoch(millisecond: Long): Instant

Creates an Instant from the millisecond of the Unix epoch.

fromSecondOfUnixEpoch
Link copied to clipboard
common
fun fromSecondOfUnixEpoch(second: Long): Instant
fun fromSecondOfUnixEpoch(second: Long, nanosecond: Int): Instant
fun fromSecondOfUnixEpoch(second: Long, nanosecond: Long): Instant

Creates an Instant from the second of the Unix epoch.

Properties

MAX
Link copied to clipboard
common
val MAX: Instant

The latest supported Instant, which can be used as a "far future" sentinel.

MIN
Link copied to clipboard
common
val MIN: Instant

The earliest supported Instant, which can be used as a "far past" sentinel.

UNIX_EPOCH
Link copied to clipboard
common
val UNIX_EPOCH: Instant

The Instant representing the Unix epoch of 1970-01-01T00:00Z.

Extensions

now
Link copied to clipboard
fun Instant.Companion.now(clock: Clock): Instant

Gets the current Instant from the provided clock.

common
fun Instant.Companion.now(): Instant

Gets the current Instant from the system clock.

common
fun Instant.Companion.now(clock: Clock): Instant

Gets the current Instant from the provided clock.