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

0 Replies to “Easter holiday dates in PHP”

Leave a Reply

Your email address will not be published. Required fields are marked *

RSS
Follow by Email
Facebook
Google+
https://preflight.co.za/2018/08/12/easter-holiday-dates-in-php">
Twitter