I'm back working on calendar-related functions. I'd like to propose an addition to the Calendar behaviour:
@callback months_in_year(year) :: month
Which returns the number of months in a year. An example use I'm currently work on is subscriptions. I bill monthly and therefore want to calculate "next month". I can increment month in {year, month, day} but then I need to know what the modulo is.
Not all calendars have 12 months. The Hebrew calendar, for example, has 13 months in a leap year. The balinese saka calendar has a similar intercalary month added from time-to-time.
I accepted I will craft a PR for this for Calendar, Calendar.ISO and tests.
--Kip