Easy Tutorial
❮ Func Math Is Nan Func Date Default Timezone Set ❯

PHP easter_date() Function

PHP Calendar Reference Manual

Example

Output the Easter date for different years:


Definition and Usage

The easter_date() function returns the Unix timestamp for midnight of Easter in the specified year.

Note: The date of Easter is defined as the first Sunday after the first full moon following the spring equinox (March 21st).

Syntax

Parameter Description
year Optional. Defines the year for which to calculate the Easter date (between 1970 and 2037). If omitted, the current year is used, based on the local time.

Technical Details

Return Value: Returns the Unix timestamp for the Easter date.
PHP Version: 4+
--- ---
Changelog: The year parameter became optional in PHP 4.3.
--- ---
❮ Func Math Is Nan Func Date Default Timezone Set ❯