Php Calendar Easter Days Function

What is a easter_days Function?
How does a easter_days Function Work?


This function is used to get Unix timestamp for midnight on Easter of a given year.


int easter_days
([ int $year [, int $method= CAL_EASTER_DEFAULT ]])

The above syntax display the number of days after March 21 on which Easter falls for a given year. If no year is specified, the current year is assumed.

Example :

echo easter_days(1999);
echo "<br>";
echo easter_days(1492);
echo "<br>";
echo easter_days(1913);
echo "<br>";
Result :

14, i.e. April 4
32, i.e. April 22
2, i.e. March 23

In the above example is easter_days function is used to display the easter days for three different years.

PHP Topics

Ask Questions

Ask Question