WaxonWaxov
Board Regular
- Joined
- Apr 9, 2009
- Messages
- 141
Hello,
This isn't a question, but a share. This formula I just finished will caluclate the date of (Roman Catholic/Protestant) Easter in the year of a given date and it does it with no VBA.
It uses the Meeus/Jones/Butcher Gregorian algorithm. This algorithm for calculating the date of Easter Sunday is given by Jean Meeus in his book '"Astronomical Algorithms" (1991) which in turn cites Spencer Jones in his book "General 'Astronomy" (1922) and also the Journal of the British Astronomical Association (1977).
This algorithm also appears in The Old Farmer's Almanac (1977), p. 69.
The JBAA cites "Butcher's 'Ecclesiastical Calendar" (1876).
The method is valid for all Gregorian years and has no exceptions and requires no tables.
As described on Wikipedia at http://en.wikipedia.org/wiki/Computus
This example assumes the given date is in cell A1. Note that it gives the date within the year. So if a date in October is given, it calculates the date of Easter the preceeding spring. If a date in February is given, it gives the date of Easter that following spring.
Note that if your business observes Good Friday, you would simply need to subtract two days from the resultant date. For 'Easter Monday' add one day, etc. (Ash Wednesday is the resultant date minus 39 and Mardi Gras is the resultant date minus 40)
Enjoy
This isn't a question, but a share. This formula I just finished will caluclate the date of (Roman Catholic/Protestant) Easter in the year of a given date and it does it with no VBA.
It uses the Meeus/Jones/Butcher Gregorian algorithm. This algorithm for calculating the date of Easter Sunday is given by Jean Meeus in his book '"Astronomical Algorithms" (1991) which in turn cites Spencer Jones in his book "General 'Astronomy" (1922) and also the Journal of the British Astronomical Association (1977).
This algorithm also appears in The Old Farmer's Almanac (1977), p. 69.
The JBAA cites "Butcher's 'Ecclesiastical Calendar" (1876).
The method is valid for all Gregorian years and has no exceptions and requires no tables.
As described on Wikipedia at http://en.wikipedia.org/wiki/Computus
This example assumes the given date is in cell A1. Note that it gives the date within the year. So if a date in October is given, it calculates the date of Easter the preceeding spring. If a date in February is given, it gives the date of Easter that following spring.
Note that if your business observes Good Friday, you would simply need to subtract two days from the resultant date. For 'Easter Monday' add one day, etc. (Ash Wednesday is the resultant date minus 39 and Mardi Gras is the resultant date minus 40)
Code:
=DATE(YEAR(A1),MONTH(DATE(YEAR(A1),MONTH(1),DAY(1)))+((INT(((MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))+(MOD((32+2*(MOD(INT(YEAR(A1)/100),4))+2*(INT((MOD(YEAR(A1),100))/4))-(MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))-(MOD((MOD(YEAR(A1),100)),4))),7))-7*(INT(((MOD(YEAR(A1),19))+11*(MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))+22*(MOD((32+2*(MOD(INT(YEAR(A1)/100),4))+2*(INT((MOD(YEAR(A1),100))/4))-(MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))-(MOD((MOD(YEAR(A1),100)),4))),7)))/451))+114)/31))-1),DAY(DATE(YEAR(A1),MONTH(1),DAY(1)))+(((MOD(((MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))+(MOD((32+2*(MOD(INT(YEAR(A1)/100),4))+2*(INT((MOD(YEAR(A1),100))/4))-(MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))-(MOD((MOD(YEAR(A1),100)),4))),7))-7*(INT(((MOD(YEAR(A1),19))+11*(MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))+22*(MOD((32+2*(MOD(INT(YEAR(A1)/100),4))+2*(INT((MOD(YEAR(A1),100))/4))-(MOD((19*(MOD(YEAR(A1),19))+(INT(YEAR(A1)/100))-(INT(INT(YEAR(A1)/100)/4))-(INT(((INT(YEAR(A1)/100))-(INT(((INT(YEAR(A1)/100))+8)/25))+1)/3))+15),30))-(MOD((MOD(YEAR(A1),100)),4))),7)))/451))+114),31))+1)-1))
Enjoy