method Date.isLeapYear
True when the year of the date is a leap year.
Example:
use std.time { Date }
fn main() io {
print("{Date.of(2028, 1, 1)!.isLeapYear()} {Date.of(2026, 1, 1)!.isLeapYear()}")
}Output
true false
pub(api) fn isLeapYear() -> boolSince. 1.0.0-beta
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:1402