转载

几天的PHP日期差异? [重复] - Date Difference in php on days? [duplicate]


问题:

This question already has an answer here: 这个问题在这里已有答案:

Is there a quick way to calculate date difference in php? 有没有快速的方法来计算PHP中的日期差异? For example: 例如:

$date1 = '2009-11-12 12:09:08';
$date2 = '2009-12-01 08:20:11';

And then do a calculation, $date2 minus $date1 然后做一个计算,$ date2减去$ date1

I read php.net documentation, but no luck. 我读了php.net文档,但没有运气。 Is there a quick way to do it? 有快速的方法吗?

解决方案:

参考: https://stackoom.com/en/question/88lm
{{o.name}}
{{m.name}}
  • 转载自:https://my.oschina.net/u/4438370/blog/5393797
  • 留言