17 Dec
2024
17 Dec
'24
5:58 p.m.
On 17. Dec 2024, at 16:44, Pablo Rodriguez via ntg-context
wrote: I guess Lua code would be easier to write, but I cannot get how each Easter Sunday may be computed.
Here you go: a = math.fmod(year,19) b = math.floor(year / 100) c = math.fmod(year,100) d = math.floor(b / 4) e = math.fmod(b,4) f = math.floor((b + 8) / 25) g = math.floor((b - f + 1) / 3) h = math.fmod((19 * a + b - d - g + 15),30) i = math.floor(c / 4) k = math.fmod(c,4) L = math.fmod((32 + 2 * e + 2 * i - h - k),7) m = math.floor((a + 11 * h + 22 * L) / 451) eastersundaymonth = math.floor((h + L - 7 * m + 114) / 31) eastersunday = math.fmod((h + L - 7 * m + 114),31) + 1 Thomas