OxL Reference

method Date.ofEpochDay

The date n days after 1970-01-01.

Example:

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

fn main() io {
  print(Date.ofEpochDay(20000)!.toIso())
}
Output
2024-10-04
pub(api) static fn ofEpochDay(n: i64) -> Date | InvalidValue

Since. 1.0.0-beta

Parameters

NameType
ni64

Returns

Date

Errors

  • InvalidValue @error
  • `InvalidValue` when `n` is outside the supported range.

Effects

none declared (pure unless the body says otherwise)

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

See also