FA-77080 / Calendar recurrence rules / Member archive
Occurrence test and next-occurrence lookup for an anchored N-weekly series: next index · case 05
Querying on an occurrence date returns that same date as the next occurrence.
Case contract
A series occurs every interval_weeks weeks starting at anchor, for count occurrences. For a query date return [is_occurrence, next occurrence strictly after the query or None, 0-based index of that next occurrence or None]. Dates before the anchor are never occurrences; the next occurrence after a query before the anchor is the anchor itself.
Why this case matters
Recurring calendar series are expanded into concrete instances for display, reminders and conflict checks.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| four-weekly aligned | [true, "2024-04-29", 2] | [true, "2024-05-27", 3] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗