php 的时间日期操作

$statistic_day = date ( "Y-m-d", mktime ( 0, 0, 0, 4, $i, 2011 ) );

$next_day = date ( "Y-m-d", strtotime ( $statistic_day . " -1 day" ) ); //取前一天

两个日期想减

$days_count = (strtotime ( $end_date ) - strtotime ( $begin_date )) / 86400;

posted @ 2011-05-16 19:22  野三坡  阅读(119)  评论(0编辑  收藏  举报