PHP easter_date() Function
Complete PHP Calendar Reference
Definition and Usage
The easter_date() function returns the Unix timestamp for midnight on Easter of a
specified
year.
Syntax
| Parameter |
Description |
| year |
Optional. Defines the year to calculate the midnight on
Easter from. If the year parameter is omitted, the current year is used. |
Tips and Notes
Note: If the year is outside of the range for Unix timestamps (before
1970 or after 2037), this function will generate a warning. The easter_days()
function can be used instead of easter_date() to calculate Easter for years
which fall outside the range.
Example
<?php
echo(easter_date() . "<br />");
echo(date("M-d-Y",easter_date()) . "<br />");
echo(date("M-d-Y",easter_date(2000)) . "<br />");
echo(date("M-d-Y",easter_date(2001)) . "<br />");
echo(date("M-d-Y",easter_date(2002)));
?>
|
The output of the code above will be:
1145138400
Apr-16-2006
Apr-23-2000
Apr-15-2001
Mar-31-2002
|
Complete PHP Calendar Reference

The Altova MissionKit is an integrated suite of tools ideal for:
- XML development
- Web & Web services development
- Data mapping & integration
- Rendering & publishing XML & database data
- XBRL validation, taxonomy editing, transformation & rendering
The MissionKit for XML Developers includes XMLSpy® - the industry-leading XML editor; MapForce® - a
graphical data mapping, conversion, and integration tool; StyleVision® - a visual XSLT stylesheet designer;
DiffDog® - an XML-aware diff/merge tool; and 2 additional tools.
Try all 6 products free for 30 days!
Download a fully-functional free trial
|
|
|
|