public static function getDateDays($fromDate, $toDate)
{
$fromDate = \DateTime::createFromFormat('Y-m-d', $fromDate);
$toDate = \DateTime::createFromFormat('Y-m-d', $toDate);
if ($fromDate == false || $toDate == false) {
return array();
}
return new \DatePeriod($fromDate, new \DateInterval('P1D'), $toDate->modify('+1 day'));
}