Easy Tutorial
❮ Func Ftp Chdir Php Looping ❯

PHP easter_days() Function

PHP Calendar Reference Manual

Example

Outputs the number of days between Easter and March 21 for different years:


Definition and Usage

The easter_days() function returns the number of days between Easter and March 21 for a specified year.

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

Syntax

Parameter Description
year Optional. Defines the year for which to calculate the date of Easter, as a number. If omitted, the default is the current year, local time.
method Optional. Allows you to calculate the date of Easter for other calendars. For example, if set to CAL_EASTER_ROMAN, it uses the Gregorian calendar for the period 1582 - 1752.

Technical Details

Return Value: Returns the number of days between Easter and March 21 for the specified year.
PHP Version: 4+
--- ---
Changelog: In PHP 4.3, the year parameter became optional, and the method parameter was added.
--- ---

❮ Func Ftp Chdir Php Looping ❯