PHP easter days

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : easter_days() function

Description

The easter_days() function returns the number of days after March 21 on which Easter comes for a given year. The default year is the current year.

Version

(PHP 4 and above)

Syntax

easter_days(year, method)

Parameter

Name

Description

Required /
Optional

Type

year

The year between 1970 to 2037.

Required

Integer

method

Calculate easter days based on Gregorian calendar during the year 1582 to 1752 when setting to CAL_EASTER_ROMAN since PHP 4.3.0.

Optional

Integer

Return value

The number of days after March 21st that the Easter Sunday is in the specified year.

Value Type : Integer.

Example :

  1. echo(easter_days(1999).'
    ');  

  2. echo(easter_days(1251).'
    ');  

  3. echo(easter_days(2060));  

  4. ?>  

Output :

14
26
28