function calendar_filter_day in Calendar 5.2
Same name and namespace in other branches
- 5 calendar.module \calendar_filter_day()
Callback for day filter. Build year, month, day, min, and max into query object.
Parameters
object $query:
integer $arg:
2 calls to calendar_filter_day()
- calendar_handler_arg_day in ./
calendar.module - Custom views handler for the day argument.
- _calendar_views_query_alter in ./
calendar.inc - @file All the code used while processing a calendar is stored in this file and is included only when needed.
File
- ./
calendar.module, line 201 - Adds calendar filtering and displays to Views.
Code
function calendar_filter_day(&$query, $arg) {
$now = date_now();
if (!isset($query->month)) {
calendar_filter_month($query, date_format($now, 'm'));
}
$query->calendar_type = 'day';
$query->day = calendar_part_is_valid($arg, 'day') ? $arg : date_format($now, 'j');
}