OxL Reference

method Date.daysUntil

Whole days from this date to other (negative when other is earlier).

Example:

oxl✓ checked in CI
use std.time { Date }

fn main() io {
  print("{Date.of(2026, 1, 1)!.daysUntil(Date.of(2026, 3, 1)!)}")
}
Output
59
pub(api) fn daysUntil(other: Date) -> i64

Since. 1.0.0-beta

Parameters

NameType
otherDate

Returns

i64

Effects

none declared (pure unless the body says otherwise)

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

See also