OxL Reference

op Period.-

The difference of two periods (part by part).

Example:

oxl✓ checked in CI
fn main() io {
  print("{(1.year() - 2.months()).show()}")
}
Output
P1Y-2M
pub(api) static op -(a: Period, b: Period) -> Period

Since. 1.0.0-beta

Parameters

NameType
aPeriod
bPeriod

Returns

Period

Effects

none declared (pure unless the body says otherwise)

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

See also