On Tue Oct 14 09:26:34 2008, gbarr@pobox.com wrote:
Show quoted text>
> No, it is 41. weeks are counted in the year to which they start. Jan 1
> 2008 was a Tuesday and weeks are counted starting on Monday, so week 1
> started on Jan 7.
>
> The C library agrees with Date::Format
>
> $ perl -MPOSIX=strftime -le '$x=time-86400; print scalar
> localtime($x),"\n",strftime("%W",localtime($x))'
> Mon Oct 13 08:23:55 2008
> 41
>
> Graham.
So why does that disagree with IBM's Lotus Notes calender, PHP's
date('W') and the result from another perl module Date::Calc?
All those give this week (starting Monday) as week 42.
It also disagrees with
http://en.wikipedia.org/wiki/ISO_week_date
Is it a count from zero vs count from one issue?
I've switched to use Date::Calc (which is cumbersome). I liked
time2str(...) as it's a whole lot easier to use.
Rgds, Dougie.