I think that Date::Calc's answer is distinctly odd. POSIX::strftime() has three distinct WoY formats, %U, %V, and %W, none of which behave as does Date::Calc::Week_of_Year().
December 31, 2003 was a Wednesday, so that Sunday-based week had four days in 2003, and by most standards should be counted as a 2003 week. Except that Date::Calc uses, as you say, a Monday based week, which flips the week to 2004. That date is an edge case.
The manpage man 3 strftime documents what the formats present, and perldoc Date::Calc documents the rules its Week_of_Year() function follows.
Is there any reason you can't set this up as a weekly cron job? I don't see why you need the week number, unless the data you retrieve is labelled that way. If so, you should look at docs or source of whatever produces the data to see if any of these functions match what it does in all cases.
After Compline,
Zaxo
In reply to Re: Date::Calc Week_of_Year offset
by Zaxo
in thread Date::Calc Week_of_Year offset
by sweetblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |