-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix recurrence iteration where there is a BYMONTHDAY rule greater than the number of days in the start month. #531
Conversation
Pull Request Test Coverage Report for Build 3019342029
💛 - Coveralls |
Pull Request Test Coverage Report for Build 3416378920
💛 - Coveralls |
59a6e3b
to
455b663
Compare
Apart from waiting for the ES6 work, is this otherwise okay? I'd like to get it heading towards shipping in Thunderbird. |
This is very similar to #418. I have not gone in details, but for me it seems both changesets approach problems with BYMONTHDAY in a different ways. |
I do not like how you phrase things in your comments here in the last weeks. It sounds rather pushy and impolite. I myself will close the other PR when I have time to cross check if the test cases there are worth keeping in addition to the ones added in the other two PRs. If anybody wants to close it earlier, he could do so. |
…le greater than the number of days in the start month. r=#thunderbird-reviewers,mkmelin kewisch/ical.js#531 Differential Revision: https://phabricator.services.mozilla.com/D158472 --HG-- extra : rebase_source : bdc9ddfc44d0eed8544fc8a01b8ec2e3ef345cd1 extra : amend_source : 98759bbffa6371ecf3ec3e46699cd13daaab898b
…n the number of days in the start month.
455b663
to
6264125
Compare
This gets tricky. If the starting month doesn't have an occurrence (e.g. June has no 31st day), we need to find the next month that does. It's possible to have a sequence of 3 months without as 31st at an interval of 2 (February, April, June) so we might need to look for the next month three times.
(In the Gregorian calendar it IS possible to miss 7 occurrences if the interval is 12 and the start is a February late in a century, but that's absurd and I will be dead by then.)