"Easter_date () PHP Function"

2007-11-03 14:55 来源: web 作者:phpma 网友评论 0 条 浏览次数 2

 

"Easter_date () PHP Function" phpma.com

Definition: Because Easter always falls on a Sunday, its numeric date changes every year. If we need to dynamically mark this on the calendar, we can use the easter_date () function. This function returns the timestamp for easter of a given year, or if no year is specified, the date of easter in the current year is returned. It is written as: easter_date (optional_year) ;

Also Known As: Easter Date, Easter Sundayphpma.com

Examples:

<?php
echo easter_date(2005) ;
// Returns 1111899600

echo date("M-d-Y", easter_date(2006)) ;
//Returns Apr-16-2006

echo date("M-d-Y", easter_date()) ;
// Returns date of Easter for current year
?> phpma.com
上一篇:"Echo () else()..    下一篇:Time() and Date(..

相关主题:

网友评论