date_info->year; $url = $view->date_info->url .'/'. $view->date_info->year; break; case 'month': $format = !empty($format) ? $format : (empty($view->date_info->mini) ? 'Y. F' : 'F'); $title = date_format_date($view->date_info->min_date, 'custom', $format); $url = $view->date_info->url .'/'. $view->date_info->year .'-'. date_pad($view->date_info->month); break; case 'day': $format = !empty($format) ? $format : (empty($view->date_info->mini) ? 'Y. F j. l' : 'F j. l'); $title = date_format_date($view->date_info->min_date, 'custom', $format); $url = $view->date_info->url .'/'. $view->date_info->year .'-'. date_pad($view->date_info->month) .'-'. date_pad($view->date_info->day); break; case 'week': $format = !empty($format) ? $format : (empty($view->date_info->mini) ? 'Y. W.' : 'W'); $title = t('Week of @date', array('@date' => date_format_date($view->date_info->min_date, 'custom', $format))); $url = $view->date_info->url .'/'. $view->date_info->year .'-W'. date_pad($view->date_info->week); break; } if (!empty($view->date_info->mini) || $link) { $attributes = array('title' => t('View full page month')); return l($title, $view->date_info->url, array('attributes' => $attributes)); } else { return $title; } }