OxL Reference

op Tm.+

A point in time plus / minus a duration (overflow panics, §3.1).

Example:

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

fn main() io {
  print("{(Time.ofUnixSeconds(0) + 2h).unixSeconds()}")
}
Output
7200
pub(api) static op +(a: Tm, b: Dur) -> Tm

Since. 1.0.0-beta

Parameters

NameType
aTm
bDur

Returns

Tm

Effects

none declared (pure unless the body says otherwise)

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

See also