chore: release v0.38.2

Fix recurring events with FREQ=WEEKLY;INTERVAL=N;BYDAY ignoring the
interval when crossing a week boundary (e.g. Friday → Monday).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ulas Kalayci
2026-04-30 10:51:01 +02:00
parent a6ecf7e9ca
commit 4a050e92a8
5 changed files with 42 additions and 4 deletions
+7 -1
View File
@@ -78,7 +78,13 @@ function nextOccurrence(baseDateStr, rrule) {
});
// Tage bis zum nächsten Vorkommen (mind. 1, damit nicht derselbe Tag)
let daysUntil = (sorted[0] - currentDay + 7) % 7;
if (daysUntil === 0) daysUntil = 7 * interval;
if (daysUntil === 0) {
// Selber Wochentag → ganzes Intervall überspringen
daysUntil = 7 * interval;
} else if ((sorted[0] + 6) % 7 < (currentDay + 6) % 7) {
// Wochengrenze überschritten (ISO-Woche MOSO) → interval-1 Wochen extra überspringen
daysUntil += 7 * (interval - 1);
}
next.setUTCDate(next.getUTCDate() + daysUntil);
}