Home > php教程 > php手册 > php准确计算复活节日期的方法

php准确计算复活节日期的方法

WBOY
Release: 2016-06-06 20:04:54
Original
1069 people have browsed it

这篇文章主要介绍了php准确计算复活节日期的方法,涉及php操作日期的技巧,非常具有实用价值,需要的朋友可以参考下

本文实例讲述了php准确计算复活节日期的方法。分享给大家供大家参考。具体如下:

( 59 + $nA )) { $nNM = $nNM + 2 - $nA; } $nNM = $nNM + 91; $nMONTH = div( 20 * $nNM, 611 ) - 2; // Day $nNT = $nN; $nNT = $nN; if ( $nNT > ( 59 + $nA )) { $nNT = $nNT + 2 - $nA; } $nNT = $nNT + 91; $nM = div( 20 * $nNT, 611 ); $nDAY = $nNT - div( 611 * $nM, 20 ); $dtEasterSunday = mktime( 0,0,0,$nMONTH,$nDAY,$nYEAR ); } return $dtEasterSunday; } ?>

希望本文所述对大家的php程序设计有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template