OxL Reference

method TimeOfDay.ofNanosOfDay

The time of day n nanoseconds after midnight.

Example:

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

fn main() io {
  match TimeOfDay.ofNanosOfDay(3600000000000) {
    TimeOfDay t => print(t.show())
    InvalidValue _ => print("out of range")
  }
}
Output
01:00:00
pub(api) static fn ofNanosOfDay(n: i64) -> TimeOfDay | InvalidValue

Since. 1.0.0-beta

Parameters

NameType
ni64

Returns

TimeOfDay

Errors

  • InvalidValue @error
  • `InvalidValue` when `n` is negative or not below one day.

Effects

none declared (pure unless the body says otherwise)

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

See also