Calculating Easter
- To: mathgroup at smc.vnet.net
- Subject: [mg40670] Calculating Easter
- From: wself at msubillings.edu (Will Self)
- Date: Sat, 12 Apr 2003 03:13:45 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
An example of the function below is easter[2003] ---> In the year 2003, Easter falls on April 20. Press, 1965, page 168: "...we shall give a purely numerical rule -- subject to no exceptions of any kind -- which calculates the date of Easter from a knowledge only of the year number..." I have retained O'Beirne's same variable names, except that I added the variable nn. easter[year_] := Module[{x = year, b, c, d, e, g, h, i, k, mu, lambda, n, p, nn}, a = Mod[x, 19]; b = Quotient[x, 100]; c = Mod[x, 100]; d = Quotient[b, 4]; e = Mod[b, 4]; g = Quotient[8b + 13, 25]; h = Mod[19a + b - d - g + 15, 30]; mu = Quotient[a + 11h, 319]; i = Quotient[c, 4]; k = Mod[c, 4]; lambda = Mod[2e + 2i - k - h + mu + 32, 7]; n = Quotient[h - mu + lambda + 90, 25]; p = Mod[h - mu + lambda + n + 19, 32]; nn = Switch[n, 3, "March ", 4, "April "]; Print[ "In the year " <> ToString[x] <> ", Easter falls on " <> nn <> ToString[p] <> "."];]
- Follow-Ups:
- Re: Calculating Easter
- From: David Terr <dterr@wolfram.com>
- Re: Calculating Easter