object Companion
source · line 86public
public companion : ValueEncoder<Instant>, ValueDecoder<Instant>
- Supertype
ValueEncoder<Instant> - Supertype
ValueDecoder<Instant>
Value construction and serialization helpers.
function fromEpochMilliseconds
source · line 120public
public fun fromEpochMilliseconds(value: Long): Instant
Constructs an instant from signed milliseconds since the Unix epoch.
parameter value
source · line 120public
value: Long
function encode
source · line 90public
public override fun encode(value: Instant, encoder: Encoder): Unit
- Overrides
encode
Encodes the value as its canonical text representation.
parameter encoder
source · line 90public
encoder: Encoder
parameter value
source · line 90public
value: Instant
function parse
source · line 142public
public fun parse(text: String): Instant
Parses ISO date-time with an explicit offset or throws IllegalArgumentException for invalid input.
parameter text
source · line 142public
text: String
function decode
source · line 94public
public override fun decode(decoder: Decoder): Instant
- Overrides
decode
Reads a string value and validates it using this type's parser.
parameter decoder
source · line 94public
decoder: Decoder
function fromEpochSeconds
source · line 109public
public fun fromEpochSeconds(seconds: Long, nanosecondAdjustment: Long = 0L): Instant
Combines epoch seconds and a signed nanosecond adjustment, normalizing and validating the supported range.
parameter nanosecondAdjustment
source · line 109public
nanosecondAdjustment: Long = 0L
parameter seconds
source · line 109public
seconds: Long
property MAX
source · line 104public
public val MAX: Instant
get: public read-only
The latest or largest supported value.
property MIN
source · line 100public
public val MIN: Instant
get: public read-only
The earliest or smallest supported value.
function parseOrNone
source · line 130public
public fun parseOrNone(text: String): Instant?
Parses ISO date-time with an explicit offset, returning None for malformed or out-of-range input.
parameter text
source · line 130public
text: String