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;
}