实例
输出不同年份的复活节与 3 月 21 日之间的天数:
<?php
echo "Easter Day is ". easter_days() . " days after March 21 this year.<br />";
echo "Easter Day was ". easter_days(1990) . " days after March 21 in 1990.<br />";
echo "Easter Day was ". easter_days(1342) . " days after March 21 in 1342.<br />";
echo "Easter Day will be ". easter_days(2050) . " days after March 21 in 2050.";
?>
运行实例 ?
定义和用法
easter_days() 返回指定年份的复活节与 3 月 21 日之间的天数。
提示:复活节的日期是被定义在每年春分(3 月 21 日)月圆之后第一个星期日。
语法
easter_days(year,method);
技术细节