//************************************** // Name: Easter Sunday // Description:This algorithm calculates the date of Easter Sunday for a given year. So you can offer different contents on your webpage whether its lenten period or not. // By: Lothar Geyer // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** // calculate date of easter sunday for a given year function easter($actYear) { $y = $actYear; $n = 5; $m = 24; $a = $y % 19; $b = $y % 4; $c = $y % 7; $d = (($a * 19) + $m) % 30; $e = (($b*2) + ($c*4) + ($d*6) + $n) % 7; $t = $d + $e + 22; if ($t > 31) { $t = $t - 31; if (($t==26) or (($t==25) && ($d==28) && ($a>10))) { $t = $t - 7; }; $m = 4; } else { $m = 3; }; $em = mktime ( 0, 0, 0, $m, $t, $y ); return $em; }