when going to Year view the links
- Month leads to 12
- Week to W49
- Day to 21-01
to fix the dates i try this:

[calendar.main.tpl.php]

<div class="calendar-calendar">
  <?php if (!empty($calendar_popup)) print $calendar_popup;?>
  <?php if (!empty($calendar_add_date)) print $calendar_add_date; ?>
  <?php // if (empty($block)) print theme('links', $calendar_links);?>
<?php   // added:

$current_year = date('Y');
$current_month = date('m');
$current_week = date('W');
$current_day = date('d');

print l("Year", "/calendar/". $current_year);
print l("Month", "/calendar/". $current_year . "-" . $current_month);
print l("Week", "/calendar/". $current_year . "-W" . $current_week);
print l("Day", "/calendar/". $current_year . "-" . $current_month . "-" . $current_day);
  
?>

  <?php print theme('date_navigation', $view) ?>
</div>

but the Week links to one week before the current week
(links to 2011-W26 but the current now is 2011-W27)
also try this with no success:

$current_week = strftime("%V",strtotime("07/02/2011"));

always the week is one before.

So, is this way a right approach for solving the problem?
If yes, the solution could be to just add +1 to the week number or this could give a wrong week number again? (in future)
If no, is there any other way to calculate the current week number?

Comments

Neslee Canil Pinto’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one.