분류 php

두 날짜 간의 일 계산

컨텐츠 정보

  • 조회 607 (작성일 )

본문

$start_date = strtotime('2018-08-11');
$end_date = strtotime('2018-08-31');
echo $days_difference = ceil(abs($end_date - $start_date) / (60 * 60 * 24));
 
/*
Output : 20
*/
php