fixed preview skips second occurrences and docs

This commit is contained in:
Benjamin Thiele
2026-08-02 11:19:55 +02:00
parent 4394ca3668
commit 01cfd119d4
2 changed files with 4 additions and 3 deletions
@@ -28,10 +28,11 @@ FREQ=frequency[;INTERVAL=n][;BYDAY=days][;BYMONTHDAY=day][;COUNT=n][;UNTIL=date]
- Default: 1
- Integer value: 2 = every other, 3 = every third, etc.
**BYDAY** (Optional, for WEEKLY)
**BYDAY** (Optional, for WEEKLY or MONTHLY with an ordinal prefix)
- Day codes: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`
- Multiple days: `MO,WE,FR`
- With MONTHLY, prefix a day code with an ordinal to mean "the Nth such weekday of the month": `1WE` (first Wednesday), `1SU` (first Sunday)
**BYMONTHDAY** (Optional, for MONTHLY)
@@ -240,7 +241,7 @@ Occurrences:
- Continues monthly...
```
#### First Weekday of Month (Ordinal BYDAY) {#first-weekday-of-month}
#### Nth Day-of-Week of Month (Ordinal BYDAY) {#first-weekday-of-month}
**RRULE:** `FREQ=MONTHLY;BYDAY=1WE`
@@ -200,7 +200,7 @@
const next = rule.after(searchFrom, i === 0);
if (!next) break;
occurrences.push(next);
searchFrom = new Date(next.getTime() + 1000);
searchFrom = next;
}
return occurrences.map((d) => format(d, "EEE, MMM d, yyyy 'at' h:mm a"));