Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function updateEasterMonday(events, from, to) {
let eastermonday = getEventByUid(events, '5bd21657-4072-4474-8007-4ffd522fea87');
if (null === eastermonday) {
return;
}
let e, easter, estermondayDates = [];
for (let y = from; y< to; y++) {
e = dateEaster.gregorianEaster(y);
easter = new Date(e.year, e.month-1, e.day);
estermondayDates.push(nextMonday(easter));
}
eastermonday.setProperty('RDATE', estermondayDates, { VALUE: 'DATE' });
}