OxL Reference

method Tm.fmt

Formats in UTC with a pattern; an empty pattern is ISO 8601 (2026-11-03T15:00:00Z).

Example:

oxl✓ checked in CI
use std.time { Time }

fn main() io {
  print(Time.ofUnixSeconds(0).fmt("yyyy-MM-dd HH:mm"))
}
Output
1970-01-01 00:00
pub(api) fn fmt(pattern: str) -> str

Since. 1.0.0-beta

Parameters

NameType
patternstr

Returns

str

Effects

none declared (pure unless the body says otherwise)

Defined in: std/time/time.oxl:1959

See also