Instant

expect class Instant : Comparable<Instant>
actual class Instant(value: Instant) : Comparable<Instant>

Constructors

Link copied to clipboard
constructor(value: Instant)

Types

Link copied to clipboard
expect object Companion
actual object Companion

Properties

Link copied to clipboard
expect val epochSeconds: Long
actual val epochSeconds: Long
Link copied to clipboard

Inherited properties

Link copied to clipboard

Get the epoch milliseconds representation of the Instant

Functions

Link copied to clipboard
expect open operator override fun compareTo(other: Instant): Int
actual open operator override fun compareTo(other: Instant): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
expect fun format(fmt: TimestampFormat): String

Encode the Instant as a string into the format specified by TimestampFormat

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
expect operator fun minus(duration: <Error class: unknown class>): Instant

Returns an instant that is the result of subtracting the specified duration from this instant. NOTE: Duration may be negative in which case the returned Instant will be later than this Instant.

expect operator fun minus(other: Instant): <Error class: unknown class>

Returns the duration between other and this instant. NOTE: The duration will be negative if other occurred after this instant.

actual operator fun minus(other: Instant): <Error class: unknown class>
Link copied to clipboard
expect operator fun plus(duration: <Error class: unknown class>): Instant

Returns an instant that is the result of adding the specified duration to this instant. NOTE: Duration may be negative in which case the returned Instant will be earlier than this Instant.

Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard

Convert Instant to a double representing seconds and milliseconds since the epoch

Link copied to clipboard
Link copied to clipboard
fun Instant.until(other: Instant): <Error class: unknown class>