Tweety's Cage www.Birdyshome.de
20. May 2012
 
Tweety
 

Infos about religious holidays
The Date of Easter
The Easter Formula


Day Month Year

Today it is Sunday, 20. May 2012

The choosen day is Sunday, 20. May 2012


April 2012
WeekMo TuWeThFr SaSu
13       1
14 2345678
15 9101112131415
16 16171819202122
17 23242526272829
18 30     
May 2012
WeekMo TuWeThFr SaSu
18  123456
19 78910111213
20 141516171819 20
21 21222324252627
22 28293031  
June 2012
WeekMo TuWeThFr SaSu
22     123
23 45678910
24 11121314151617
25 18192021222324
26 252627282930



Infos about religious holidays

Back to the top...



For the calculation of german / christian holidays the knowledge of the Easter date is very important. That's why it seems to be natural to have the special PHP function easter_date(). It is a very nice feature that handles the calculation :). You will find a little more about Easter at The Date of Easter.
Here you are a small table with the dependencies of the religious holidays on Easter. All other holidays are on fixed days like Chirstmas, Silvester,...

Name Amount of days around Easter
Rosenmontag-48 Tage
Karfreitag-2 Tage
Ostersamstag-1 Tag
Ostermontag+1 Tag
Christi Himmelfahrt+39 Tage
Pfingstsamstag+48 Tage
Pfingstsonntag+49 Tage
Pfingstmontag+50 Tage
Fronleichnam+60 Tage

The date of Easter

Back to the top...



I found this information while sneaking at the Internet:
Since the judes returned from babylonic exil the day of Easter (Pesach, Pascha) is calculated as Sunday after the first full moon after the beginning of spring (21. of March). The christian people took over this rule for their Easter festival.
The german mathematician Carl Friedrich Gauß (1777-1855) was able to calculate the date of Easter for every year after the Gregorian calendar reform (1582) from 1583-8201. But it is still unclear whether 3200 or 3600 the leap year has to be skipped for compensating some 'over time'.

At Wikipedia there is a quite a large section about Easter, some other calendar types and different calculations Wikipedia - Osterdatum. For those who are not interested in the whole paragraph - although it is very interesting - I provide you this link for Calendar FAQ from Claus Tondering. He doesn't only write about some background information about Easter but summarizes many calender systems and calculation with very nice and complex explanations.

The Easter formula

Back to the top...



As I analysed all of the formulas for Excel, php and so on, I was wondering about and intersted in the origin of the Easter formula and I found it. Because of its complexity I thought about writing a small table that shows the calculation step by step.
Choose the Year for the Easter calculation:

Easter formula in general
FormulaValue
C = Year / 100 20
G = Year mod 19 17
H = (C - C/4 - (8*C+13)/25 + 19*G + 15) mod 30 17
I = H - (H/28)*(1 - (29/(H + 1))*((21 - G)/11)) 17
J = (Jahr + Jahr/4 + I + 2 - C + C/4) mod 7 6
L = I - J 11
Easter month = 3 + (L + 40)/44 4
Easter day = L + 28 - 31*(Easter month/4) 8
Easter formula for the years 1900-2099
FormulaValue
C = Year / 100 skipped
G = Year mod 19 skipped
H = (24 + 19*(Jahr mod 19)) mod 30 17
I = H - H / 28 17
J = (Jahr + Jahr/4 + I - 13) mod 7 6
L = I - J 11
Easter month = 3 + (L + 40)/44 4
Easter day = L + 28 - 31*(Easter month/4) 8
PHP Function easter_date() delivers: 07.04.2012
Additional a few explanations for this formula mass: For every closer explanations just visit Claus Tondering

Unfortunately the PHP function easter_date() has some restrictions:
  1. it is only useable for the years 1970-2037,
  2. it is only a function for PHP (there might be some other functions for other languages), and
  3. a funny thing with my XAMPP the years between 1971-1974 are delivering a wrong date :D
Just for fun I added the date including the days name from Eastersunday 2012 (by using strftime('%A, %d. %B 1971',easter_date($Year)): Saturday, 07. April 2012 - Everything was OK after the online test! What a pity - I was so happy to find an error :q

If you look a little closer to the tabular you might wonder about no remainders. The FAQ from Claus Tondering tells something about (Again, the divisions are integer divisions, in which remainders are discarded.). So I used the PHP-funkcion floor() instead of round(). Nevertheless I tested both of them and as expected floor() delivered the same results as easter_date().
Here is my complete Esaster-function in PHP:

function osterdatum($osterjahr){
 $G = bcmod($osterjahr,19);
 $C = floor($osterjahr / 100);
 $H = bcmod($C - floor($C / 4) - floor((8 * $C + 13) / 25) + 19 * $G + 15, 30);
 $I = $H - floor($H / 28) * (1 - floor(29/($H + 1)) * floor((21 - $G) / 11));
 $J = bcmod($osterjahr + floor($osterjahr / 4) + $I + 2 - $C + floor($C / 4), 7);
 $L = $I - $J;
 $EasterMonth = 3 + floor(($L + 40) / 44);
 $EasterDay = $L + 28 - 31*floor($EasterMonth / 4);

 $H2 = bcmod(24 + 19*(bcmod($osterjahr, 19)), 30);
 $I2 = $H2 - floor($H2 / 28);
 $J2 = bcmod($osterjahr + floor($osterjahr / 4) + $I2 - 13, 7);
 $L2 = $I2 - $J2;
 $EasterMonth2 = 3 + floor(($L2 + 40) / 44);
 $EasterDay2 = ($L2 + 28 - 31 * floor($EasterMonth2 / 4));

 $osterdatum_arr = array("G" => $G, "C" => $C, "H" => $H, "I" => $I, "J" => $J, "L"
=> $L,"Ostermonat" => $EasterMonth, "Ostertag" => $EasterDay,"H2" => $H2, "I2" =>
$I2, "J2" => $J2, "L2" => $L2, "Ostermonat2" => $EasterMonth2, "Ostertag2" =>
$EasterDay2);

 return $osterdatum_arr;
}


For every comments, advices or complaints you can use my guestbook or forum.