devela::all

Function is_leap_year

Source
pub const fn is_leap_year(year: i32) -> bool
Available on crate feature time only.
Expand description

Returns true if the provided year is a leap year.

A leap year occurs every four years to help synchronize the calendar year with the solar year or the length of time it takes the Earth to complete its orbit around the Sun, which is about 365.25 days. A year is considered a leap year if it is divisible by 4 but not by 100, or if it is divisible by 400.