Skip to content

//core/io.islandtime/Instant/Companion

Companion

common

object Companion

Properties

Name Summary
MAX

common


val MAX: Instant

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

common


val MIN: Instant

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

common


val UNIX_EPOCH: Instant

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

Functions

Name Summary
fromMillisecondOfUnixEpoch

common


fun fromMillisecondOfUnixEpoch(millisecond: Long): Instant

Creates an Instant from the millisecond of the Unix epoch.
fromSecondOfUnixEpoch

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.
now

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.

jvm


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

Gets the current Instant from the provided clock.