I found this equation for calculating easter:
c = y / 100
n = y - 19 * ( y / 19 )
k = ( c - 17 ) / 25
i = c - c / 4 - ( c - k ) / 3 + 19 * n + 15
i = i - 30 * ( i / 30 )
i = i - ( i / 28 ) * ( 1 - ( i / 28 ) * ( 29 / ( i + 1 ) ) * ( ( 21 - n ) / 11 ) )
j = y + y / 4 + i + 2 - c + c / 4
j = j - 7 * ( j / 7 )
l = i - j
m = 3 + ( l + 40 ) / 44
d = l + 28 - 31 * ( m / 4 )
[link]
it specifically indicates this is integer math... so i created this:
<?php
$y = 2010;
(int)$c = (int)$y / 100;
(int)$n = (int)$y - 19 * ((int)$y / 19 );
(int)$k = ((int)$c - 17 ) / 25;
(int)$i = (int)$c - (int)$c / 4 - ((int)$c - (int)$k ) / 3 + 19 * (int)$n + 15;
(int)$i = (int)$i - 30 * ((int)$i / 30 );
(int)$i = (int)$i - ((int)$i / 28 )*( 1 - ((int)$i / 28 )*( 29 / ((int)$i + 1 ))*(( 21 - (int)$n) / 11 ));
(int)$j = (int)$y + (int)$y / 4 + (int)$i + 2 - (int)$c + (int)$c / 4;
(int)$j = (int)$j - 7 * ((int)$j / 7 );
(int)$l = (int)$i - (int)$j;
(int)$m = 3 + ( (int)$l + 40) / 44;
(int)$d = (int)$l + 28 - 31 * ((int)$m / 4 );
echo "Month: " .(int)$m ."<br/>";
echo "Day: " .(int)$d ."<br/>";
?>
its not working for me... my output is:
Month: 3
Day: 4
but the site I got the equation says:
"...resulting in Easter on April 4, 2010..."
am i missing something?
thanks!