tempo/month_year
Functions
pub fn next(month: MonthYear) -> MonthYear
Returns the next month in the civil calendar.
Example
tempo.MonthYear(tempo.Jan, 2024)
|> month_year.next
// -> tempo.MonthYear(tempo.Feb, 2024)
tempo.MonthYear(tempo.Dec, 2024)
|> month_year.next
// -> tempo.MonthYear(tempo.Jan, 2025)
pub fn prior(my: MonthYear) -> MonthYear
Returns the previous month in the civil calendar.
Example
tempo.MonthYear(tempo.Jan, 2024)
|> month_year.prior
// -> tempo.MonthYear(tempo.Dec, 2023)
tempo.MonthYear(tempo.Feb, 2024)
|> month_year.prior
// -> tempo.MonthYear(tempo.Jan, 2024)