function theme_event_calendar_date_box in Event 5
Same name and namespace in other branches
- 5.2 event.theme \theme_event_calendar_date_box()
Format an date's day box in a calendar
Parameters
day: The day to display.
2 theme calls to theme_event_calendar_date_box()
- event_get_calendar in ./
event.module - Returns a calendar in the requested format, populated with the provided nodes. This is not used internally, rather it is an API funciton for external modules to use for rendering calendars when constructing thier own event objects.
- event_render_day in ./
event.module - Returns an day of events for a calendar.
File
- ./
event.theme, line 332
Code
function theme_event_calendar_date_box($year, $month, $day, $view) {
switch ($view) {
case 'table':
$output = '<div class="day">' . t('%month / %day', array(
'%month' => $month,
'%day' => $day,
)) . '</div>' . "\n";
break;
case 'list':
$stamp = _event_mktime(0, 0, 0, $month, $day, $year);
$output = '<div class="day">' . t('%weekday %month %day, %year', array(
'%weekday' => t(format_date($stamp, 'custom', 'l')),
'%month' => t(format_date($stamp, 'custom', 'F')),
'%day' => $day,
'%year' => $year,
)) . '</div>' . "\n";
break;
case 'day':
break;
default:
$output = '<div class="day">' . $day . '</div>' . "\n";
break;
}
return $output;
}