function getPeriod($startDate, $endDate)
{
$one = new DateTime(date($startDate));
$two = new DateTime(date($endDate));
$period = $one->diff($two);
return $period->format('%s');
}
function getPeriod($startDate, $endDate)
{
$one = new DateTime(date($startDate));
$two = new DateTime(date($endDate));
return $one->diff($two)->s;
}
function getPeriod($startDate, $endDate)
{
$d1_ts = strtotime($startDate);
$d2_ts = strtotime($endDate);
return abs($d1_ts - $d2_ts);
}