datebook/month
Utility functions for gleam/time’s calendar.Month.
Values
pub fn last_day(month: calendar.Month, year: Int) -> Int
Returns the last day of the month in a given year.
Examples
last_day(March, 2005)
// -> 31
last_day(February, 2024)
// -> 29
last_day(February, 2025)
// -> 28
pub fn next(month: calendar.Month) -> calendar.Month
Returns the next month for a given Month.
Examples
next(March)
// -> April
pub fn previous(month: calendar.Month) -> calendar.Month
Returns the previous month for a given Month.
Examples
previous(March)
// -> February