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
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|