function calendar_groupby_times in Calendar 6.2
Same name and namespace in other branches
- 8 calendar.module \calendar_groupby_times()
- 7.3 calendar.module \calendar_groupby_times()
- 7 calendar.module \calendar_groupby_times()
- 7.2 calendar.module \calendar_groupby_times()
1 call to calendar_groupby_times()
- calendar_view_plugin_style::init in includes/
calendar_view_plugin_style.inc - Init will be called after construct, when the plugin is attached to a view and a display.
File
- ./
calendar.module, line 415 - Adds calendar filtering and displays to Views.
Code
function calendar_groupby_times($type = '') {
$times = array();
switch ($type) {
case 'hour':
for ($i = 0; $i <= 23; $i++) {
$times[] = date_pad($i) . ':00:00';
}
break;
case 'half':
for ($i = 0; $i <= 23; $i++) {
$times[] = date_pad($i) . ':00:00';
$times[] = date_pad($i) . ':30:00';
}
break;
default:
break;
}
return $times;
}