Yes, a PR will be appreciated. Thank you! If you can revisit any place we rely on the 12 months assumption, if any, that would be very welcome too.
*José Valimwww.plataformatec.com.br <http://www.plataformatec.com.br/>Founder and Director of R&D* On Sun, Mar 4, 2018 at 2:11 AM, Kip <kipco...@gmail.com> wrote: > 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 elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ms > gid/elixir-lang-core/812c799c-cf39-45cc-a202-6953bea3a496% > 40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/812c799c-cf39-45cc-a202-6953bea3a496%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4Jatcj_S6a-TBpnyir3snCB_WM-wk5imnGiiNO2UgUviQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.