new features

This commit is contained in:
Matthias Hochmeister
2026-03-23 16:47:36 +01:00
parent 8c66492b27
commit 690f260b71
9 changed files with 80 additions and 36 deletions

View File

@@ -393,7 +393,9 @@ class EventsService {
* Capped at 100 instances and 2 years from the start date. */
private generateRecurrenceDates(startDate: Date, _endDate: Date, config: WiederholungConfig): Date[] {
const dates: Date[] = [];
const limitDate = config.bis ? new Date(config.bis + 'T23:59:59Z') : new Date(0);
const defaultLimit = new Date(startDate);
defaultLimit.setUTCFullYear(defaultLimit.getUTCFullYear() + 2);
const limitDate = config.bis ? new Date(config.bis + 'T23:59:59Z') : defaultLimit;
const interval = config.intervall ?? 1;
// Cap at 100 instances max, and 2 years
const maxDate = new Date(startDate);