@@ 227-237 (lines=11) @@ | ||
224 | } |
|
225 | else { |
|
226 | // Deal with the start day unless it starts on midnight precisely at which point the whole day is booked |
|
227 | if (!($this->event->getStartDate()->format('H:i') == '00:00')) { |
|
228 | $itemized_start = $this->createHourlyGranular($start_date, new \DateTime($start_date->format("Y-n-j 23:59:59")), $interval); |
|
229 | $itemized[EventItemizer::BAT_DAY][$sy][$sm]['d' . $sd] = -1; |
|
230 | $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd]; |
|
231 | $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = $itemized_start[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd]; |
|
232 | } |
|
233 | else { |
|
234 | // Just set an empty hour and minute |
|
235 | $itemized[EventItemizer::BAT_HOUR][$sy][$sm]['d' . $sd] = array(); |
|
236 | $itemized[EventItemizer::BAT_MINUTE][$sy][$sm]['d' . $sd] = array(); |
|
237 | } |
|
238 | ||
239 | // Deal with the end date unless it ends just before midnight at which point we don't need to go further |
|
240 | if ($this->event->getEndDate()->format('H:i') == '23:59') { |
|
@@ 240-249 (lines=10) @@ | ||
237 | } |
|
238 | ||
239 | // Deal with the end date unless it ends just before midnight at which point we don't need to go further |
|
240 | if ($this->event->getEndDate()->format('H:i') == '23:59') { |
|
241 | $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed] = array(); |
|
242 | $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed] = array(); |
|
243 | } |
|
244 | else { |
|
245 | $itemized_end = $this->createHourlyGranular(new \DateTime($end_date->format("Y-n-j 00:00:00")), $end_date->add(new \DateInterval('PT1M')), $interval); |
|
246 | $itemized[EventItemizer::BAT_DAY][$ey][$em]['d' . $ed] = -1; |
|
247 | $itemized[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed] = $itemized_end[EventItemizer::BAT_HOUR][$ey][$em]['d' . $ed]; |
|
248 | $itemized[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed] = $itemized_end[EventItemizer::BAT_MINUTE][$ey][$em]['d' . $ed]; |
|
249 | } |
|
250 | } |
|
251 | ||
252 | return $itemized; |