You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't skip anchors with strict matching in Calendar.RecurrenceRule. Resolve#881 (#1000)
In recurrence rules that expand days or weekdays in a month, we first use a base
recurrence to calculate "anchors" in the month, and then change the day of month
or weekday to find results. Because the base recurrence used to match the day of
month of the start date, we could miss anchors if matching was set to `.strict`.
This change makes sure that if we know that the day of month is known to change,
we reset it to 1 in the base recurrence. Likewise, we reset the month in case of
leap month.
componentsForEnumerating.dayOfYear = recurrence.calendar.component(.dayOfYear, from: start)% daysInWeek // mod 7 to get the same weekday in the beginning of the year, so it's guaranteed to always exist
0 commit comments