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

Need an easy way to get data into XML, or transform XML to another format?
MapForce lets you map XML data to/from any combination of XML, database, flat file, Excel 2007, XBRL, or Web services data.
Then it transforms data instantly or auto-generates royalty-free data integration code for recurrent conversions.
New features in Version 2010!
Download a free, fully functional 30-day trial to experience the following features:
- Easy-to-use, graphical data mapping interface
- Instant data transformation
- XSLT 1.0/2.0 and XQuery code generation
- Java, C#, and C++ code generation
- Advanced data processing functions
- Support for all major relational databases including SQL Server, IBM DB2, Oracle, and more
- Visual Studio & Eclipse integration
Download a fully-functional trial today!
|
|
|
|