How to use the date-easter.gregorianEaster function in date-easter

To help you get started, we’ve selected a few date-easter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gadael / icsdb / src / specialevents.js View on Github external
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' });
}

date-easter

Calculates Easter for a given year

MIT
Latest version published 8 months ago

Package Health Score

60 / 100
Full package analysis