PHP easter_days()

PHP easter_days()

easter_days() function returns the number of days after March 21, on which Easter falls for a specified year.
Syntax of this function:
easter_days(year,method) year - defines the year to calculate the midnight on Easter from. If the year parameter is omitted, the current year is used. (optional) method - allows you to calculate Easter dates based on other calendars. E.g. it uses the Gregorian calendar during the years 1582 - 1752 when set to CAL_EASTER_ROMAN. (optional) Note: If the year is outside of the range for Unix timestamps (before 1970 or after 2037), this function will generate a warning.

Example

It shows the basic use of this function. PHP easter_days() "; echo(easter_days(1990));//year in 1990 echo"
"; echo(easter_days(1342));//year in 1342 echo"
"; echo(easter_days(2050));//year in 2050 ?>
This is the output of the codes above.
result
Tags

Add new comment