easter_date

int easter_date([int year]) 

Gets the UNIX-style timestamp of Easter midnight for the given year.

Returns:

UNIX timestamp; FALSE if the year is before 1970 or after 2037

Description:

easter_date() calculates the UNIX-style timestamp of midnight on Easter for the given year. If no year argument is provided, the current year is assumed.

UNIX-style timestamps are valid only for years from 1970 to 2037. If the year argument specified is outside this range, the function returns FALSE.

UNIX timestamps can be used with a variety of functions, including date(), unixtojd(), and gmdate()—see the date and time functions for more information.

Version:

3.0.9+, 4+

See also:

To find the number of days after March 21 until Easter for a given year: ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.