We are using the ISO 8601-standard to show week numbers here in Sweden. Most people seems to be confused about this standard that week 1 can be in the former year. I am aware of this.
I have different strange problem, every date on a Monday is showing wrong week number. As far as I know weeks should start on Mondays according to this standard and the PHP manual. Have I missed something obvious? I am using PHP5.3.3. Thanks in advance!
$week = date('W', strtotime('2011-01-24'));
//gives $week = 03
$week = date('W', strtotime('2011-01-25'));
//gives $week = 04 correct!
According to my calendar 2011-01-24 should be week 4
It is most likely a timezone issue.
Try again by explicitly setting the timezone offset: