You are here

function event_calendar_day in Event 5.2

Same name and namespace in other branches
  1. 5 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 625

Code

function event_calendar_day($op, $date, $types = NULL, $terms = NULL, $rewrite_parameter = array()) {
  $today = _event_user_date();
  $dow = _event_day_of_week($date);
  $month_name = event_format_date($date, 'custom', 'M');
  $weekdays = event_week_days();
  event_calendar_data($date, 'day', $types, $terms, 'prepopulate', array(), $rewrite_parameter);
  $thead[] = array(
    'data' => event_format_date($date, 'custom', 'D'),
  );
  $tbody[][] = array(
    'class' => strtolower("{$month_name} " . $weekdays[$dow]['day'] . ($date['day'] == $today['day'] ? ' today' : '')),
    'id' => strtolower($month_name . $date['day']),
    'data' => event_render_day($date, 'day', $types, $terms, $rewrite_parameter),
    'colspan' => 3,
  );
  return array(
    $thead,
    $tbody,
  );
}