Function utc_datetime::leap_year [−][src]
Expand description
Conditions for judging leap years
- Divisible by 4, but not divisible by 100
- Divisible by 400
Example
use utc_datetime::leap_year;
assert!(leap_year(2000));
assert_eq!(leap_year(2021),false);
assert_eq!(leap_year(1900),false);