Hi there,
Consider the following recurrence rule:
DTSTART:20250909T170000Z
RULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;UNTIL=20251220
notice that the DTSTART date lands on a Tuesday, but the BYDAY rule specifies that the events occur on on MWF, not on Tuesday.
using a library like rrule-temporal, it correctly calculates the first occurrence is Wednesday, Sept 10th. But, scheduled-x has it starting on the same date as the DTSTART, screenshot included
i realize that you've implemented your own RRULE calculator, but you may find it more maintainable, bug-free, and feature rich to use an existing package instead of maintaining your own implementation. the code i used to to generate all occurrences of an event is:
import { RRuleTemporal } from "rrule-temporal";
const rruleString =
"DTSTART:20250909T170000Z\nRRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;UNTIL=20251220";
const rule = new RRuleTemporal({ rruleString });
const nextOccurrence = rule.all();
console.log(nextOccurrence[0]!.toPlainDateTime().toString());