# Easter Sunday

Email
 Submitted on: 4/1/2018 4:59:18 AM By: Lothar Geyer Level: Intermediate User Rating: Unrated Compatibility: PHP 5.0 Views: 4027

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.

code:
Can't Copy and Paste this?
 ``` //************************************** // 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 //************************************** // 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; } ```

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)