Current Location: Home> Function Categories> easter_date

easter_date

Returns the Unix timestamp for Easter midnight for the specified year.
Name:easter_date
Category:Uncategorized
Programming Language:php
One-line Description:Returns the Unix timestamp for Easter midnight for the specified year.

Definition and usage

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).

Example

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

grammar

 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.
Similar Functions
Popular Articles