Index: theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/date/theme/theme.inc,v
retrieving revision 1.1.4.36
diff -u -r1.1.4.36 theme.inc
--- theme.inc	8 Jun 2009 23:10:58 -0000	1.1.4.36
+++ theme.inc	28 Nov 2009 18:43:47 -0000
@@ -101,29 +101,29 @@
   switch ($granularity) {
     case 'year':
       $title = $view->date_info->year;
-      $url = $view->date_info->url .'/'. $view->date_info->year;
+      $url = date_real_url($view, NULL, $view->date_info->year);
       break;
     case 'month':
       $format = !empty($format) ? $format : (empty($view->date_info->mini) ? 'F Y' : '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);
+      $url = date_real_url($view, NULL, $view->date_info->year .'-'. date_pad($view->date_info->month));
       break;
     case 'day':
       $format = !empty($format) ? $format : (empty($view->date_info->mini) ? 'l, F j Y' : 'l, F j');
       $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);
+      $url = date_real_url($view, NULL, $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) ? 'F j Y' : 'F j');
+      $format = !empty($format) ? $format : (empty($view->date_info->mini) ? 'F j Y' : 'F j');
       $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;
+      $url = date_real_url($view, NULL, $view->date_info->year .'-W'. date_pad($view->date_info->week));
+      break;
   }
   // TODO Update this.
   if (!empty($view->date_info->mini) || $link) {
-  	// Month navigation titles are used as links in the mini view.
+    // Month navigation titles are used as links in the mini view.
    $attributes = array('title' => t('View full page month'));
-  	return l($title, $view->date_info->url, array('attributes' => $attributes));
+    return l($title, $url, array('attributes' => $attributes));
   }
   else {
     return $title;

