Possible Duplicates:
Number of seconds from now() to Sunday midnight
Calculates difference between two dates in PHP
大家好,
在我的项目中,我需要计算difference in seconds between two dates:
例如:
$firstDay = "2011-05-12 18:20:20";
$secondDay = "2011-05-13 18:20:20";
那么我应该得到86400 Seconds,也就是24小时.
同样适用于
$firstDay = "2011-05-13 11:59:20";
$secondDay = "2011-05-13 12:00:20";
它应该返回60 Seconds.
我在stackoverflow But they only deals
题中读了很多题,2 minute fields和11:50:01 and 12:10:57的区别是什么?