Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Sortem
CD Door Close, Open - MCI
Send OSA Script
DirectMedia Xtra 2
Slider bar-Alphamania
Application Xtra
Scroll Thumb
Save text to a file
Faux Marquee Tool
Screen Savers
MediaMacros Xtras Mall
 

 

 

Behavior Get Easter Date

Added on 4/27/2000

 

Compatibilities:
D7 D8 Mac PC Script Shockwave

Rating:

Author: EricIverson

Returns teh date for Easter in any given Year

--put easterdate(2000)
-- [#day: 23, #month: 4, #year: 2000]
--As an added bonus, since Easter always falls on a Sunday, you could theoretically combine this function with a leap year function --and get the day of the week for any date between 1583 and 4099.  But you would also have to be pretty much insane.
--Thanks to Greg Mallen for the original algorithm and Ronald W. Mallen of Adelaide Australia for the research.  You can check out his web page at http://www.assa.org.au/edm.html
--Any suggestions on how to make the algorithm above even smaller, gratefully appreciated.
on GetEasterDate y
   --"all arguments are integer types
   --
   --"INPUTS
   --"y is the year (1583 to 4099)
   --
   --"OUTPUTS
   --"d day of month
   --"m month
   --
   --"==========================================================
   --
   --"This algorithm is adapted from a faq document by Claus Tondering
   --"URL: http://www.pip.dknet.dk/~pip10160/calendar.faq2.txt
   --"E-mail: c-t@pip.dknet.dk.
   --
   --"The FAQ algorithm is based in part on the algorithm of Oudin (1940)
   --"as quoted in "Explanatory Supplement to the Astronomical Almanac",
   --"P. Kenneth Seidelmann, editor.
   --
   --"Additions by Greg Mallen:
   --"(1) adds method 2 calculations (original calculation, converted to
   --Gregorian date)
   --"(2) modified d and m calculations to account for later dates produced by
   --method 2
   --
   --"==========================================================
   --
   --Dim g   "golden year - 1
   --Dim c   "century
   --Dim h   " = (23 - Epact) mod 30
   --Dim i   "no of days from March 21 to Paschal Full Moon
   --Dim p   "no of days from March 21 to Sunday on or before PFM
   --            "(-6 to 28 methods 1 & 3, to 56 for method 2)
   --Dim e   "extra days to add for method 2 (converting Julian date to Gregorian
   --date)
   --
   --"calc intermediate vars
   --"~~~~~~~~~~~~~~~~~~~~~~
   g = y Mod 19
   c = y / 100
   h = (c - c / 4 - (8 * c + 13) / 25 + 19 * g + 15) Mod 30
   i = h - (h / 28) * (1 - (h / 28) * (29 / (h + 1)) * ((21 - g) / 11))
   --"return day and month
   --"~~~~~~~~~~~~~~~~~~~~
   p = i - ((y + y / 4 + i + 2 - c + c / 4) Mod 7)
   --" p can be from -6 to 56 (for all valid years 326 to 4099, all methods)
   --" corresponds to dates 22 March to 23 May
   --" (later dates apply to method 2, although 23 May never actually occurs)
   return([#year:y, #day:1 + (p + 27 + (p + 6) / 40) Mod 31, #month:3 + (p + 26) / 30])
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail