📌  相关文章
📜  如何计算两个日期之间的差异 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:43.831000             🧑  作者: Mango

代码示例1
$datetime1     = new DateTime('2020-10-11 16:52:52');
$datetime2     = new DateTime('2020-10-13 16:52:52');
$interval     = $datetime1->diff($datetime2);

echo $interval->format('%a days');