PHP easter date

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

PHP : easter_date() function

Description

The easter_date() returns the Unix timestamp corresponding to midnight on Easter for the given year.
If you want to calculate Easter before 1970 or after 2037 (i.e. Unix timestamps) use easter_days() instead of easter_date().

Version

(PHP 4 and above)

Syntax

easter_date (year)

Parameters

Name

Description

Required /
Optional

Type

year

The year as number between 1970 to 2037

Optional

Integer

Return value

The easter date as a unix timestamp.

Value Type : Integer.

Example :

  1. $date = easter_date (2005);  

  2. echo (date('M, d', $date).'
    ');  

  3. echo (date("M-d-Y",easter_date(2008)).'
    ');  

  4. echo (date("M-d-Y",easter_date(2007)) . '
    ');  

  5. echo (date("M-d-Y",easter_date(2006)) . '
    ');  

  6. ?>  

Output :

Mar, 26
Mar-22-2008
Apr-07-2007
Apr-15-2006