OxL Reference

method Dur.ofDays

Exactly 24 hours per day (a Period of days is calendar based, §17.2).

Example:

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

fn main() io {
  print("{Duration.ofDays(1).hours()}")
}
Output
24
pub(api) static fn ofDays(n: i64) -> Dur

Since. 1.0.0-beta

Parameters

NameType
ni64

Returns

Dur

Effects

none declared (pure unless the body says otherwise)

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

See also