OxL Reference

error invalid-date

error Standard: [§1.5]

What it means#

The lexer recognises dates greedily by the template DDDD-DD-DD[TDD:DD[:DD[.D+]]][Z] (§1.5) and then validates the value: the month must be 01-12, the day must exist in that month, the hour 00-23, and the minutes and seconds 00-59. A trailing Z makes the literal a UTC Time; without it the type is Date or LocalDateTime.

Example#

oxl✓ checked in CI
fn main() {
  let release = 2026-13-45      // <- invalid-date
}
error
invalid-date

How to fix#

oxl✓ checked in CI
fn main() {
  let release = 2026-11-03
}

Correct the components. To subtract numbers that look like a date, write spaces around the minus sign: 2026 - 11.

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides