FA-76937 / Calendar recurrence rules / Member archive
Monthly BYSETPOS selection from a weekday set: emit order · case 02
BYSETPOS=-1,1 emits the last day before the first, and COUNT keeps the wrong instance.
Case contract
FREQ=MONTHLY;BYDAY=<weekdays>;BYSETPOS=<positions>. For each month from the dtstart month, the candidate set is every day of the whole month whose weekday is listed, in date order. Positions are 1-based, negative from the end; out-of-range positions are ignored and positions naming the same day yield it once. Selected days are emitted chronologically; days before dtstart are dropped after selection. Return the first count ISO dates.
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 |
|---|---|---|---|
| first and last in reverse order | ["2024-03-29", "2024-03-01", "2024-04-30", "2024-04-01"] | ["2024-03-01", "2024-03-29", "2024-04-01", "2024-04-30"] | 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 ↗