I know you're all curious so here's the Easter algorithm for your maps.  Actually, 
it's MS Excel but close enough. Of
course, when you replace "Year" by something like LEFT(CURRENTDATE(),4), the map rules 
could get pretty long.

Jim

(I wonder how many list readers we've lost with this discussion?)

Month=INT(INT(MOD(((19*MOD(Year,19))+ INT(Year/100) - INT(INT(Year/100)/4) - 
INT((INT(Year/100) - INT((INT(Year/100) +
8)/25) + 1)/3) + 15),30)+MOD((32+(2*MOD(INT(Year/100),4))+(2 * INT(C1/4))-MOD(((19 * 
MOD(Year,19))+B1- INT(B1/4) -
INT((B1- INT((B1+ 8)/25) + 1)/3) +15),30)-MOD(C1,4)),7)-7*INT((MOD(Year,19) 
+(11*MOD(((19*MOD(Year,19))+B1-
INT(B1/4) - INT((B1- INT((B1+ 8)/25) +1)/3) +15),30))+ (22* MOD(((19* MOD(Year,19))+ 
INT(Year/100) -
INT(INT(Year/100)/4) - INT((INT(Year/100)- INT((INT(Year/100) + 8)/25) +1)/3) 
+15),30)))/451)+114)/31)

Day=MOD((MOD(((19*MOD(Year,19))+INT(Year/100)-INT(INT(Year/100)/4)-INT((INT(Year/100)-INT((INT(Year/100)+
8)/25)+1)/3)+15),30)+MOD(32 + (2 * MOD(INT(Year/100),4)) + (2 * INT(MOD(Year,100)/4)) -
MOD(((19*MOD(Year,19))+INT(Year/100)-INT(INT(Year/100)/4)-INT((INT(Year/100)-INT((INT(Year/100)+
8)/25)+1)/3)+15),30) -
MOD(MOD(Year,100),4),7)-7*INT((MOD(Year,19)+(11*MOD(((19*MOD(Year,19))+INT(Year/100)-INT(INT(Year/100)/4)-INT((INT(Yea
r/100)-INT((INT(Year/100)+ 8)/25)+1)/3)+15),30))+ (22*MOD(32 + (2 * 
MOD(INT(Year/100),4)) + (2 *
INT(MOD(Year,100)/4)) -
MOD(((19*MOD(Year,19))+INT(Year/100)-INT(INT(Year/100)/4)-INT((INT(Year/100)-INT((INT(Year/100)+
8)/25)+1)/3)+15),30) - MOD(MOD(Year,100),4),7)))/451)+114),31) + 1


----- Original Message -----
From: "Hurd, Richard A (Rich)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 9:18 AM
Subject: Re: EDI dates


> I was waiting for this.
>
> > The algorithms are the stuff of nightmares. In some cases you end up
> > with external lookup tables which have to be refreshed 'manually' every
> > year or two, plus useful lists of the public holidays in most major
> > industrialised countries! The use of external tables is a cop-out, but
> > things like the algorithmic calculation of Easter (The first Sunday
> > after the first full moon after the Vernal Equinox) can be very tedious.
> >
> >
> http://www.smart.net/~mmontes/butcher.html
>
> I used to be involved in automating an MVS data center for Merrill Lynch.
> One of the biggest tasks we had for the production jobstream was modifying
> the JCL with date parameters.  I was on the team that wrote a program to
> modify the JCL date parameters, but it had to pre-calculate all the dates in
> order to figure out what dates to insert.   (Being a brokerage house, one of
> the dates that we needed to insert was Good Friday which is a bank holiday.
> The only thing we were sure about before we had this algorithm was that it
> was Easter-2.)
>
> We didn't use this algorithm exactly, since the guy doing it didn't have
> Internet access (this was 1981, fer Pete's sake.)  He got the algorithm by
> going to the NY Public Library and doing the research.
>
> I did it by typing "calculating the date of Easter" in Google.  How far
> we've come!
>
> =======================================================================
> To contact the list owner:  mailto:[EMAIL PROTECTED]
> Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/
>

=======================================================================
To contact the list owner:  mailto:[EMAIL PROTECTED]
Archives at http://www.mail-archive.com/edi-l%40listserv.ucop.edu/

Reply via email to