

In this case 2009-W52 runs runs 28th December 2009 through 3rd January 2010, and 2010-W01 starts on Monday 4th January 2010.

So 2014-W01 runs from 30th December 2013 to 5th January 2014. Consider the transition from 2013 to 2014: December 2013 January 2014
#WEEK NUMBER FOR 2014 ISO#
ISO 8601 defines week 01 as being the week with the first Thursday in it. The iso_week_number() function returns a string with the week number according to ISO 8601.
#WEEK NUMBER FOR 2014 PLUS#
Plus I sometimes have an epoch and sometimes a date string, so I decided to experiment with a DWIMish interface (Do What I Mean), where you could pass the date in whatever format you have it available, and it'll be handled. There are a number of modules that can be used to calculate the week number, but I wanted a minimalist interface that returned a string format, rather than the year and week number separately. The CPAN week number is the definition used by Chris Madsen's CPAN once a week, every week contest, and my CPAN Regulars Releasers page. A more complete definition of the week naming schemes is given below. There are two functions provided: iso_week_number() returns the week number according to ISO 8601, where the weeks run from Monday through Sunday, and cpan_week_number(), where the weeks run from Sunday through Saturday. Which at the time I'm writing this will print: Today is in week 2014-W09 For example: print "Today is in week ", iso_week_number(time()), "\n" The two functions provided by this module can be used to generate the week number in the year of a given date. # pass parameters as for cpan_week_number() above DESCRIPTION Or to get weeks according to ISO 8601: use Date::WeekNumber qw/ iso_week_number / Date::WeekNumber - calculate week of the year (ISO 8601 weeks, or 'CPAN weeks') SYNOPSIS use Date::WeekNumber qw/ cpan_week_number /
