I found a problem with holidays timestamp computation and daylight saving time.An article about it at http://goo.gl/76t31 (in french only, sorry).

In summary, this year (2013) easter begins before adding an hour for daylight saving time (occured sunday at 3:00). It means that if you do $easter + X, where x is a number of seconds equivalent to one day, 39 days or 50 days, the result is not equals to a midnight timestamp...

Here a function to check if a midnight timestamp is equals to an holiday :

The algorithm from Bigtree is correct if you add some (int) cast<?php function easter_date ($Year) {

/* G is the Golden Number-1 H is 23-Epact (modulo 30) I is the number of days from 21 March to the Paschal full moon J is the weekday for the Paschal full moon (0=Sunday, 1=Monday, etc.) L is the number of days from 21 March to the Sunday on or before the Paschal full moon (a number between -6 and 28) */

Due to range limitations of core functions such as easter_date(), mktime(), strtotime(), I wrote this function to get the Easter Day in string format yyyy-mm-dd.

function myEaster($year){ /*Warning: easter_date(): This function is only valid for years between 1970 and 2037 * The easter_days() function can be used instead of easter_date() to calculate Easter for years which fall outside the range. */ //The next line would do the work if there were no limitations: //return date("Y-m-d",easter_date($year));

/*Outside range (1970,2037) they advise to use easter_days(). * Unfortunately, when you have to create a date object as 21-03-yyyy to which add easter_days(), then obtain Easter, * functions like strtotime(), DateTime::createFromFormat() will fail. (return value is 01-01-1970) */ $march21=date("$year-03-21"); $days=easter_days($year); if($year<=2037) //The next line would do the work if strtotime() wasn't affected by same limitations. But, the if..else is required to handle all years. $date = date("Y-m-d",strtotime(date("Y-m-d", strtotime($march21)) . " +$days day")); else { if($days<=10){ $day=str_pad(21+$days, 2, '0', STR_PAD_LEFT); $date=date("$year-03-$day"); } else { $day=str_pad($days-10, 2, '0', STR_PAD_LEFT); $date=date("$year-04-$day"); } }