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
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elixir-lang-core/812c799c-cf39-45cc-a202-6953bea3a496%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.