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
Describe the bug
Recurrence evaluation produces incorrect results when applying FREQ=YEARLY, BYWEEKNO together with date expansions (i.e. BYMONTH, BYMONTHDAY, BYYEARDAY)
To Reproduce
The following test cases fail (when added to RecurrenceTestCases.txt)
# 30.12 in WEEK 1 with expansion on BYMONTH, BYMONTHDAY, BYWEEKNO
RRULE:FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=30;BYWEEKNO=1;UNTIL=20320101DTSTART:20241230
INSTANCES:20241230,20251230,20301230,20311230
# 30.12 in WEEK 52 with expansion on BYMONTH, BYMONTHDAY, BYWEEKNO, which only exists in 2026, 2032, 2027 in the observed range.
RRULE:FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=30;BYWEEKNO=52;UNTIL=20340101DTSTART:20271230
INSTANCES:20271230,20281230,20291230,20331230
# 30.12 in WEEK 53 with expansion on BYMONTH, BYMONTHDAY, BYWEEKNO
RRULE:FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=30;BYWEEKNO=53;UNTIL=20380101DTSTART:20261230
INSTANCES:20261230,20321230,20371230
# 2.1 in WEEK 1 with expansion on BYMONTH, BYMONTHDAY, BYWEEKNO
RRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=2;BYWEEKNO=53;UNTIL=20290102DTSTART:20250102
INSTANCES:20250102,20260102,20290102
# 2.1 in WEEK 52 with expansion on BYMONTH, BYMONTHDAY, BYWEEKNO
RRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=2;BYWEEKNO=53;UNTIL=20390102DTSTART:20280102
INSTANCES:20280102,20390102
# 2.1 in WEEK 53 with expansion on BYMONTH, BYMONTHDAY, BYWEEKNO
RRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=2;BYWEEKNO=53;UNTIL=20380102DTSTART:20270102
INSTANCES:20270102,20330102,20380102
Environment (please complete the following information):
ical.net version: current main branch (as of 2025-02-15)
The text was updated successfully, but these errors were encountered:
* Fix#729: incorrect expansion behaviour after `BYWEEKNO`
I.e. fix `BYMONTH`, `BYMONTHDAY`, `BYYEARDAY` in relation to `BYWEEKNO`
* Reduce cyclomatic complexity of `GetWeekNoVariants` to make CodeCov a little happier.
* Make method static to avoid CodeCov complaining.
---------
Co-authored-by: axunonb <[email protected]>
Describe the bug
Recurrence evaluation produces incorrect results when applying
FREQ=YEARLY
,BYWEEKNO
together with date expansions (i.e.BYMONTH
,BYMONTHDAY
,BYYEARDAY
)To Reproduce
The following test cases fail (when added to
RecurrenceTestCases.txt
)Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: