type Tm
impl TmС версии. 1.0.0-beta
Методы
ofUnixSeconds | (s: i64) -> TmThe instant s seconds after the Unix epoch (UTC). |
ofUnixMillis | (ms: i64) -> TmThe instant ms milliseconds after the Unix epoch. |
ofUnixNanos | (n: i64) -> TmThe instant n nanoseconds after the Unix epoch. |
unixSeconds | () -> i64Whole seconds since the Unix epoch. |
unixMillis | () -> i64Whole milliseconds since the Unix epoch. |
unixNanos | () -> i64Nanoseconds since the Unix epoch. |
+ | (a: Tm, d: Dur) -> TmThe instant d later. |
- | (a: Tm, d: Dur) -> TmThe instant d earlier. |
- | (a: Tm, b: Tm) -> DurThe duration between two instants. |
in | ()The same instant in a zone. |
date | () -> DateCalendar date in UTC. |
fmt | (pattern: str) -> strFormats in UTC with a pattern; an empty pattern is ISO 8601 (2026-11-03T15:00:00Z). |
toIso | () -> strThe instant as ISO 8601 in UTC. |
parse | (text: str, format: TimeFormat | str) -> Tm | ParseErrorParses 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) -> TmA point in time plus / minus a duration (overflow panics, §3.1). |
- | (a: Tm, b: Dur) -> TmThe instant b earlier. |
Определено в: std/time/time.oxl:1790