// Implements the Meeus/Jones/Butcher algorithm // https://en.wikipedia.org/wiki/Date_of_Easter#Anonymous_Gregorian_algorithm export const getEasterDate = (year: number) => { const a = year % 19; const b = Math.floor(year / 100); const c = year % 100; const d = Math.floor(b / 4); const e = b % 4; const f = Math.floor((b + 8) / 24); const g = Math.floor((b - f + 1) / 3); const h = (19 * a + b - d - g + 15) % 30; const i = Math.floor(c / 4); const k = c % 4; const l = (32 + 2 * e + 2 * i - h - k) % 7; const m = Math.floor((a + 11 * h + 22 * l) / 451); const n = Math.floor((h + l - 7 * m + 114) / 31); const o = (h + l - 7 * m + 114) % 31; return new Date(year, n - 1, o + 1); };