OxL Reference

op Dur.-

The difference of two durations (may be negative).

Example:

oxl✓ checked in CI
fn main() io {
  print("{(1h - 15m).minutes()} {(15m - 1h).isNegative()}")
}
Output
45 true
pub(api) static op -(a: Dur, b: Dur) -> Dur

Since. 1.0.0-beta

Parameters

NameType
aDur
bDur

Returns

Dur

Effects

none declared (pure unless the body says otherwise)

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

See also