简单教程
提交运行
代码编辑器:
<?php $date1 = date_create("2013-03-15"); $date2 = date_create("2013-12-12"); $diff = date_diff($date1,$date2); print_r($diff);
运行结果: