FA-77232 / Calendar recurrence rules / Member archive
Parsing and validating RRULE property text: byday pattern · case 02
BYDAY=+2TU is rejected as malformed.
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 |
|---|---|---|---|
| plus ordinal | {"error": "bad BYDAY +2TU"} | {"byday": [[2, "TU"]], "count": null, "freq": "MONTHLY", "interval": 1, "until": null} | 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 ↗