Function time::util::is_leap_year
source · [−]Expand description
Returns if the provided year is a leap year in the proleptic Gregorian calendar. Uses astronomical year numbering.
assert!(!is_leap_year(1900));
assert!(is_leap_year(2000));
assert!(is_leap_year(2004));
assert!(!is_leap_year(2005));
assert!(!is_leap_year(2100));