<?php
$periodStartDate = new \DateTime('today');
$periodStartDate = $periodStartDate->modify('-5 days');
$periodEndDate = new \DateTime('today');
$periodEndDate->modify('+1 day');
$period = new \DatePeriod($periodStartDate, \DateInterval::createFromDateString('1 day'), $periodEndDate);
foreach ($period as $date) {
echo $date->format('Y-m-d');
//if ($this->getDayOffInDaysOffByDate($daysOff, $date) || $this->isWeekend($date)) {
// $daysCount--;
//}
}
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
- 2017-06-302017-07-012017-07-022017-07-032017-07-042017-07-05
preferences:
158.36 ms | 403 KiB | 219 Q