[php] 날짜 일수 차이 date_diff()
본문
<?php
$start_day = new DateTime('2017-01-01'); // 20120101
$end_day = new DateTime('2017-12-01'); // 20121201
$datediff = date_diff($start_day, $end_day);
echo $datediff->days;
?>
$start_day = new DateTime('2017-01-01'); // 20120101
$end_day = new DateTime('2017-12-01'); // 20121201
$datediff = date_diff($start_day, $end_day);
echo $datediff->days;
?>
추천0
댓글목록 0
등록된 댓글이 없습니다.