tempo/year
Functions to use with the Year
type in Tempo. Years are pretty simple
thankfully.
Functions
pub fn days(of year: Int) -> Int
Get the number of days in a year. Accounts for leap years.
Examples
year.days(2024)
// -> 366
year.days(2025)
// -> 365
pub fn is_leap_year(year: Int) -> Bool
Checks if a year is a leap year.
Examples
year.is_leap_year(2024)
// -> True
year.is_leap_year(2025)
// -> False