easter_date
Returns the Unix timestamp for Easter midnight for the specified year.
easter_date()
function returns the Unix timestamp for Easter midnight for the specified year.
Tip: The date of Easter is the first Sunday after the full moon every year (March 21).
Output Easter dates for different years:
<?php echo easter_date ( ) . "<br />" ; echo date ( "MdY" , easter_date ( ) ) . "<br />" ; echo date ( "MdY" , easter_date ( 1980 ) ) . "<br />" ; echo date ( "MdY" , easter_date ( 1984 ) ) . "<br />" ; echo date ( "MdY" , easter_date ( 2016 ) ) ; ?>
Run the instance
easter_date ( year ) ;
parameter | describe |
---|---|
year | Optional. Defines the year used to calculate the Easter date (between 1970 and 2037). If omitted, the default is to use the current year and local time. |