Fix RRULE BYDAY with multiple days only returning first day #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix issue #75: Recurring events with BYDAY=TU,TH only returning one day
Summary
Fixed a bug where recurring events with
RRULE:FREQ=WEEKLY;BYDAY=TU,TH(or any multiple-day BYDAY rule) were only returning events for the first day instead of all specified days.Changes
Fixed
src/IcalParser.php(lines 214-241)INTERVAL * 7days from DTSTART, which fails for multiple BYDAY values (e.g., Tuesday and Thursday are only 2 days apart, not 7)INTERVAL * 7days from DTSTART)Added test case
tests/cal/75_weekly_tuesday_thursday.ics: Tests weekly recurring event with BYDAY=TU,THtests/events.recurring.phpt: Added test verifying all 11 occurrences (6 Tuesdays + 5 Thursdays) are returnedTesting
✅ Issue #75 resolved: BYDAY=TU,TH returns both Tuesday and Thursday events (11 total)
✅ Issue #61: Bi-weekly single-day test passes (INTERVAL=2, BYDAY=TU returns 3 events)
✅ daily_recur2: Weekly single-day without explicit INTERVAL passes (4 Monday events)
✅ Issue #38: Weekly multi-day test passes (BYDAY=MO,TU,WE,TH,FR)
✅ No security issues detected
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.