Recurrence: DAILY+INTERVAL+BYDAY search window too small (spurious failure) #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
next_occurrencefor DAILY useslimit = interval + 10days (src/core/recurrence.rs:204) while also requiring the day to satisfy BYDAY (line 208). When the interval-aligned days and the BYDAY weekdays only coincide far out, the window is exhausted and it returns an error.Repro:
FREQ=DAILY;INTERVAL=5;BYDAY=MOwith a Monday anchor — first day that is both a multiple of 5 from anchor and a Monday is 35 days out (lcm(5,7)=35), but limit=15, sodonefails with "no daily occurrence found within 15 days".Fix: widen the daily search bound to cover the lcm of interval and 7 (e.g.
interval*7 + slack, mirroring the WEEKLY bound at line 183), or compute the next aligned weekday directly. Add a test for the repro case.Found in review.