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
{{ message }}
Repository navigation
expandOccurrences with from shifts MONTHLY BYMONTHDAY=31,-31 grid #42
Since 0.8.0 (PR #39), expandOccurrences with from returns other occurrences than the same call without from for at least one MONTHLY shape, both reported complete: true. PR #39 promises the filtered full result.
without from, until: '2029-01-01', filtered to 2026: 2026-07-01 2026-07-31 2026-12-01 2026-12-31
from: '2026-01-01', same until: 2026-03-01 2026-03-31 2026-08-01 2026-08-31
Cause, as far as read: DTSTART's month (June) holds neither the 31st nor day -31, so ical.js shifts its INTERVAL grid when walking from DTSTART (Jun 1992 -> Oct 1992 -> Mar 1993 ...). iterationStart moves the start by whole FREQ x INTERVAL periods, which assumes the grid never shifts. walkedInFull excludes YEARLY days not in every month, fifth weekdays and far BYSETPOS, but not a MONTHLY BYMONTHDAY list that can leave a month empty.
Probed and equal with and without from: BYMONTHDAY=31, =-31, =-30, =-29, =-1 alone (INTERVAL 1-5), MONTHLY from the 31st/30th/29th without BYMONTHDAY, YEARLY from 29 February, BYSETPOS=-1 over weekdays. Only the mixed 31,-31 list differed in that sample, so the exact boundary is unproven.
Found by PhilflowIO/dav-mcp's test "the 31st every fifth month" (__tests__/override-occurrences.test.js) while moving dav-mcp to 0.8.0.
Fix
Walk such MONTHLY rules from DTSTART (extend walkedInFull), or prove when the grid cannot shift.
The property test "with from equals the filtered result without it" should generate MONTHLY BYMONTHDAY lists above 28 and mixed signs, with INTERVAL > 1 and a DTSTART in a short month.
Activity
test(month-end): accept only ical.js's own refusals
test: bound speed checks by counted work, not the clock
chore(deps): move to @philflow/tsdav-utils 0.8.1