public static function CalendarHelper::buildDayHours in Calendar 8.2
Helper function to build array with hours.
@TODO make this configurable as 24hr or AM/PM.
Return value
array Array with hours formatted as h:i.
File
- src/
CalendarHelper.php, line 349
Class
- CalendarHelper
- Class CalendarHelper.
Namespace
Drupal\calendarCode
public static function buildDayHours() {
$day_hours = [];
$i = 0;
do {
$day_hours[sprintf("%05.2f", $i)] = NULL;
$i++;
} while ($i < 24);
return $day_hours;
}