Closed kipcole9 closed 5 years ago
Thanks Kip! Note for anyone else looking at this, it can also manifest as "previous" month being equal to current month dates, suspect this is the same bug but I was unsure whether to open one issue or two so spoke to Kip and he thinks he has the source/is probably one bug for both.
I have push a commit which I believe fixes this problem. I added a series of test to confirm that next and previous periods align properly to each other. If possible please test on master branch before I push to hex if you can.
In a week-based calendar, the idea of a "month" is notional and is represented by the
:weeks_in_month
configuration key. In some cases theCldr.Calendar.previous/2
function is returning a result that is 2 "months" back, not one.For example:
Will error with:
Decoded, this means:
Which is 2 months back, not one.