- labels: --> Interface (example)
If starting weekday is set to Monday, the calendar week number for 2007 will be wrong (the week number displayed is +1 greater than the correnct number). The problem surfaces this year, because 2007 starts on a monday.
The error is in the function get_week_number($day, $month, $year) in functions.inc.php.
Suggested correction:
Current code:
if($CONFIG_EXT['day_start']) $week = strftime("%W", mktime(0, 0, 0, $month, $day, $year));
else $week = strftime("%U", mktime(0, 0, 0, $month, $day, $year));
should be replaced with:
$week = strftime("%U", mktime(0, 0, 0, $month, $day, $year)
This is apparently because the %U/%W (Sunday/Monday) distinction is already taken care of in other parts of the code.
I tested the suggested fix both with Sunday and Monday as week start, and it appears to be correct also for 2006 and 2008. I suggest a walk-thru of the code to verify if my assumption is correct.
/hamsel
Per Hertz