UNPKG

easter-date

Version:

Calculate the date of Easter for a given year

24 lines (23 loc) 697 B
/** * Returns the date of Easter Monday for a given year. * * @example Get the date of Easter Monday for the year 2023 * ```ts * import { getEasterMonday } from "easter-date"; * const easterMonday = getEasterMonday(2023); * console.log(easterMonday); // 2023-04-10T00:00 * ``` * @param year */ export declare function getEasterMonday(year: number): Date; /** * Returns true if the given date is Easter Monday. * @example Check if a date is Easter Monday * ```ts * import { isEasterMonday } from "easter-date"; * const date = new Date("2023-04-10"); * console.log(isEasterMonday(date)); // true * ``` * @param date */ export declare function isEasterMonday(date: Date): boolean;