method Date.ofEpochDay
The date n days after 1970-01-01.
Example:
use std.time { Date }
fn main() io {
print(Date.ofEpochDay(20000)!.toIso())
}Output
2024-10-04
pub(api) static fn ofEpochDay(n: i64) -> Date | InvalidValueSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
n | i64 |
Returns
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