OxL Справочник OxL
РусскийEnglish

type Tm

impl Tm

С версии. 1.0.0-beta

Методы

ofUnixSeconds(s: i64) -> Tm
The instant s seconds after the Unix epoch (UTC).
ofUnixMillis(ms: i64) -> Tm
The instant ms milliseconds after the Unix epoch.
ofUnixNanos(n: i64) -> Tm
The instant n nanoseconds after the Unix epoch.
unixSeconds() -> i64
Whole seconds since the Unix epoch.
unixMillis() -> i64
Whole milliseconds since the Unix epoch.
unixNanos() -> i64
Nanoseconds since the Unix epoch.
+(a: Tm, d: Dur) -> Tm
The instant d later.
-(a: Tm, d: Dur) -> Tm
The instant d earlier.
-(a: Tm, b: Tm) -> Dur
The duration between two instants.
in()
The same instant in a zone.
date() -> Date
Calendar date in UTC.
fmt(pattern: str) -> str
Formats in UTC with a pattern; an empty pattern is ISO 8601 (2026-11-03T15:00:00Z).
toIso() -> str
The instant as ISO 8601 in UTC.
parse(text: str, format: TimeFormat | str) -> Tm | ParseError
Parses ISO 8601 with an offset (2026-11-03T18:00:00+03:00) or a pattern; text without an offset is UTC.
+(a: Tm, b: Dur) -> Tm
A point in time plus / minus a duration (overflow panics, §3.1).
-(a: Tm, b: Dur) -> Tm
The instant b earlier.

Определено в: std/time/time.oxl:1790

См. также