Bug Description
RecurrenceEngineV2.getNextMonthly() (lines 305-308 in core/events/RecurrenceEngineV2.js) has a BYSETPOS branch that is effectively a no-op:
} else if (rule.bySetPos && rule.bySetPos.length > 0) {
// BYSETPOS for selecting from set
next.setMonth(next.getMonth() + rule.interval);
// Complex BYSETPOS logic would go here
}
It advances the month but doesn't apply any BYSETPOS selection logic.
Impact
- RRULE patterns using BYSETPOS (e.g., "last weekday of month") generate incorrect occurrences
- This is a common pattern in corporate calendars (e.g., "last Friday of every month")
- RFC 5545 compliance gap
Expected Fix
Implement BYSETPOS to:
- Generate the full set of candidate dates for the month based on other BY* rules
- Apply BYSETPOS indices to select from that set (supporting positive and negative indices)
Files
core/events/RecurrenceEngineV2.js:305-308
Bug Description
RecurrenceEngineV2.getNextMonthly()(lines 305-308 incore/events/RecurrenceEngineV2.js) has a BYSETPOS branch that is effectively a no-op:It advances the month but doesn't apply any BYSETPOS selection logic.
Impact
Expected Fix
Implement BYSETPOS to:
Files
core/events/RecurrenceEngineV2.js:305-308