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()}")
}Вывод
true false
pub(api) fn isLeapYear() -> boolС версии. 1.0.0-beta
Возвращает
bool
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/time/time.oxl:1402