Companion

object Companion

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
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
Creates an Instant from the second of the Unix epoch.
fun fromSecondOfUnixEpoch(second: Long, nanosecond: Int): Instant
Creates an Instant from the second of the Unix epoch.
fun fromSecondOfUnixEpoch(second: Long, nanosecond: Long): Instant
Creates an Instant from the second of the Unix epoch.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
toString
Link copied to clipboard
common
open fun toString(): String

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.