Companion

object Companion

Functions

equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
fromMillisecondOfUnixEpoch
Link copied to clipboard
common

Creates an Instant from the millisecond of the Unix epoch.

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

Creates an Instant from the second of the Unix epoch.

fun fromSecondOfUnixEpoch(second: Long): Instant
fun fromSecondOfUnixEpoch(second: Long, nanosecond: Int): Instant
fun fromSecondOfUnixEpoch(second: Long, nanosecond: Long): Instant
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

MAX
Link copied to clipboard
common

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

val MAX: Instant
MIN
Link copied to clipboard
common

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

val MIN: Instant
UNIX_EPOCH
Link copied to clipboard
common

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

val UNIX_EPOCH: Instant

Extensions

now
Link copied to clipboard

Gets the current Instant from the provided clock.

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

Gets the current Instant from the system clock.

common
fun Instant.Companion.now(): Instant

Gets the current Instant from the provided clock.

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