PHP计算日期相差天数(时间差计算)

PHP 1402 0 2013-04-30

PHP计算日期相差天数(时间差计算)
//$Date_1为开始日期,$Date_2为结束日期
function dayNum($Date_1,$Date_2){
$d1=strtotime($Date_1);
$d2=strtotime($Date_2);
$Days=round(($d2-$d1)/3600/24);
return $Days;

上一篇:PHPLIB中的template.inc应用实例

下一篇:mod_rewrite实现php伪静态

讨论数量:0

请先登录再发表讨论。 2024-04-27

天涯网魂
3 杠 5 星
TA 的文章
TA 的随言
TA 的资源链