OxL Reference

op Date.+

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

Example:

oxl✓ checked in CI
fn main() io {
  print("{(2026-01-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:1510

See also