function event_calendar_day in Event 5
Same name and namespace in other branches
- 5.2 event.module \event_calendar_day()
Displays a daily event calendar.
Return value
a themed daily event calendar.
Related topics
1 call to event_calendar_day()
- event_page in ./
event.module - Displays a page containing event information. The page layout defaults to a graphical calendar.
File
- ./
event.module, line 606
Code
function event_calendar_day($op, $stamp, $types = NULL, $terms = NULL) {
$today = _event_user_date();
$year = gmdate('Y', $stamp);
$month = gmdate('m', $stamp);
$day = gmdate('j', $stamp);
$dow = _event_day_of_week($stamp);
$month_name = gmdate('M', $stamp);
$weekdays = event_week_days();
$thead[] = array(
'data' => t(gmdate('D', $stamp)),
);
$tbody[][] = array(
'class' => strtolower("{$month_name} " . $weekdays[$dow]['day'] . ($stamp == $today ? ' today' : '')),
'id' => strtolower($month_name . $day),
'data' => event_render_day($year, $month, $day, 'day', $types, $terms),
'colspan' => 3,
);
return array(
$thead,
$tbody,
);
}