| @@ 50-52 (lines=3) @@ | ||
| 47 | // Figure out how many days the current month has |
|
| 48 | $temp_date = new \DateTime($data['year'] . "-" . $data['month']); |
|
| 49 | $days_in_month = (int)$temp_date->format('t'); |
|
| 50 | for ($i = 1; $i<=$days_in_month; $i++) { |
|
| 51 | $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d'.$i]; |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| 55 | // With the day events taken care off let's cycle through hours |
|
| @@ 54-56 (lines=3) @@ | ||
| 51 | // Figure out how many days the current month has |
|
| 52 | $temp_date = new \DateTime($data['year'] . "-" . $data['month']); |
|
| 53 | $days_in_month = (int)$temp_date->format('t'); |
|
| 54 | for ($i = 1; $i <= $days_in_month; $i++) { |
|
| 55 | $db_events[$data['unit_id']][Event::BAT_DAY][$data['year']][$data['month']]['d' . $i] = $data['d' . $i]; |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | // With the day events taken care off let's cycle through hours |
|