FA-77239 / Calendar recurrence rules / Member archive
Parsing and validating RRULE property text: ordinal range · case 04
BYDAY=0MO is accepted as if it had no ordinal.
Case contract
Parse "NAME=VALUE;..." rule text. Part names are case-insensitive; empty parts (a trailing ";") are ignored; a part without "=" is malformed; any repeated part name is an error; FREQ is required. INTERVAL defaults to 1 and must be >= 1. BYDAY tokens are an optional signed 1-2 digit ordinal (explicit "+" allowed) followed by MO..SU; a present ordinal must satisfy 1 <= |n| <= 53. Errors are returned as {"error": message}; otherwise {"freq","interval","byday":[[n, day]],"count","until"}.
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 |
|---|---|---|---|
| zero ordinal | {"byday": [[0, "MO"]], "count": null, "freq": "MONTHLY", "interval": 1, "until": null} | {"error": "bad ordinal"} | 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 ↗