OxL Reference

method Date.of

Validated constructor: Date.of(2026, 11, 3).

Example:

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

fn main() io {
  print("{Date.of(2026, 11, 3)!.toIso()} {Date.of(2026, 2, 31) is InvalidValue}")
}
Output
2026-11-03 true
pub(api) static fn of(year: i64, month: i64, day: i64) -> Date | InvalidValue

Since. 1.0.0-beta

Parameters

NameType
yeari64
monthi64
dayi64

Returns

Date

Errors

Effects

none declared (pure unless the body says otherwise)

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

See also