You are here

function template_preprocess_calendar_month_multiple_node in Calendar 6.2

Same name in this branch
  1. 6.2 theme/theme.inc \template_preprocess_calendar_month_multiple_node()
  2. 6.2 calendar_multiday/theme/theme.inc \template_preprocess_calendar_month_multiple_node()
Same name and namespace in other branches
  1. 7 theme/theme.inc \template_preprocess_calendar_month_multiple_node()
  2. 7 calendar_multiday/theme/theme.inc \template_preprocess_calendar_month_multiple_node()
  3. 7.2 theme/theme.inc \template_preprocess_calendar_month_multiple_node()
  4. 7.2 calendar_multiday/theme/theme.inc \template_preprocess_calendar_month_multiple_node()

Format an calendar month node for display.

File

calendar_multiday/theme/theme.inc, line 722

Code

function template_preprocess_calendar_month_multiple_node(&$vars) {
  $view = $vars['view'];
  $curday = $vars['curday'];

  // get the year month and date
  $parts = explode('-', substr($curday, 0, 10));
  $year = $parts[0];
  $month = intval($parts[1]);
  $day = intval($parts[2]);

  // create the link to the day
  $vars['link'] = date_real_url($view, NULL, date_pad($year, 4) . '-' . date_pad($month) . '-' . date_pad($day));
}