method Date.daysUntil
Whole days from this date to other (negative when other is earlier).
Example:
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) -> i64Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
other | Date |
Returns
i64
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:1472