OxL Reference

op Date.-

The date before subtracting a calendar period (the day is clamped to the length of the month).

Example:

oxl✓ checked in CI
fn main() io {
  print("{(2026-03-31 - 1.month()).toIso()}")
}
Output
2026-02-28
pub(api) static op -(d: Date, p: Period) -> Date

Since. 1.0.0-beta

Parameters

NameType
dDate
pPeriod

Returns

Date

Effects

none declared (pure unless the body says otherwise)

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

See also