PHP - Function easter_days()


Advertisements


Syntax

easter_days ( [$year [, $method]] );

Definition and Usage

Returns the number of days after March 21 on which Easter falls for a given year. If no year is specified, the current year is assumed.

Parameters

ParameterDescription
yearOptional. The year as a number between 1970 an 2037
methodOptional. Allows 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

Return Value

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

Example

Try out following example:

<?php
echo easter_days(1999)."\n";
echo easter_days(1492)."\n"; 
echo easter_days(1913);
?> 

This will produce following result:

14
32
2

php_function_reference.htm

Advertisements