Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

PHP Function easter_days()


previous

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.

Paramters

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);
echo"<br />";
echo easter_days(1492); 
echo"<br />";
echo easter_days(1913);
?> 

This will produce following result:

14
32
2

previous Printer Friendly

Advertisements


  

Advertisements