function theme_date_calendar_day in Date 7
Same name and namespace in other branches
- 8 date_api/theme/theme.inc \theme_date_calendar_day()
 - 6.2 theme/theme.inc \theme_date_calendar_day()
 - 7.3 date_api/theme/theme.inc \theme_date_calendar_day()
 - 7.2 date_api/theme/theme.inc \theme_date_calendar_day()
 
Theme for a date block that looks like a mini calendar day. Pass in a date object already set to the right timezone, format as a calendar page date. The calendar styling is created in css.
File
- date_api/
theme/ theme.inc, line 157  - Theme files for Date API.
 
Code
function theme_date_calendar_day($vars) {
  $date = $vars['date'];
  if (empty($date)) {
    return NULL;
  }
  return '<div class="date-calendar-day">' . '<span class="month">' . date_format_date($date, 'custom', 'M') . '</span>' . '<span class="day">' . date_format_date($date, 'custom', 'j') . '</span>' . '<span class="year">' . date_format_date($date, 'custom', 'Y') . '</span>' . '</div>';
}