Preflight Projects Simple solutions to complex problems.

Easter holiday dates in PHP

Get’s the Monday and the preceding Friday.


$year=date(“Y”);

$eastermonday=date(“Y-m-d”, strtotime( “+”.(easter_days($year) + 1).” days”, strtotime(“$year-03-21 12:00:00”) ));
$easterfriday=date(“Y-m-d”, strtotime( “+”.(easter_days($year) – 2).” days”, strtotime(“$year-03-21 12:00:00”) ));


RTFM

Go expose yourself someplace