Date-WeekOfYear
    
    
  
  
  
view release on metacpan or search on metacpan
WeekOfYear.html view on Meta::CPAN
<p>As of version 1.5 the ISO 8601 week number is calculated. For backwards compatibility a flag can be passed after the time to give the previous functionality.</p>
<p>For example:</p>
<pre><code>  my $weekNo = WeekOfYear(undef, 1);  # Week number now in pre ISO 8601 mode
  or
  my $weekNo = WeekOfYear($the_time, 1);  # Week number for $the_time in pre ISO 8601 mode</code></pre>
<h1 id="ISO-8601">ISO 8601</h1>
<p>Weeks in a Gregorian calendar year can be numbered for each year. This style of numbering is commonly used (for example, by schools and businesses) in some European and Asian countries, but rare elsewhere.</p>
<p>ISO 8601 includes the ISO week date system, a numbering system for weeks - each week begins on a Monday and is associated with the year that contains that week's Thursday (so that if a year starts in a long weekend Friday-Sunday, week number o...
<p>An ISO week-numbering year (also called ISO year informally) has 52 or 53 full weeks. That is 364 or 371 days instead of the usual 365 or 366 days. The extra week is referred to here as a leap week, although ISO 8601 does not use this term. Weeks ...
<h2 id="Calculations">Calculations</h2>
<h3 id="Ordinal-Day">Ordinal Day</h3>
<p>If the ordinal date is not known, it can be computed by any of several methods. perhaps the most direct is a table such as the following:</p>
WeekOfYear.pm view on Meta::CPAN
For example:
  my $weekNo = WeekOfYear(undef, 1);  # Week number now in pre ISO 8601 mode
  or
  my $weekNo = WeekOfYear($the_time, 1);  # Week number for $the_time in pre ISO 8601 mode
=head1 ISO 8601
Weeks in a Gregorian calendar year can be numbered for each year. This style of
numbering is commonly used (for example, by schools and businesses) in some European
and Asian countries, but rare elsewhere.
ISO 8601 includes the ISO week date system, a numbering system for weeks - each week
begins on a Monday and is associated with the year that contains that week's Thursday
(so that if a year starts in a long weekend Friday-Sunday, week number one of the year
will start after that). For example, week 1 of 2004 (2004W01) ran from Monday 29
December 2003 to Sunday, 4 January 2004, because its Thursday was 1 January 2004,
whereas week 1 of 2005 (2005W01) ran from Monday 3 January 2005 to Sunday 9 January
2005, because its Thursday was 6 January 2005 and so the first Thursday of 2005. The
( run in 0.263 second using v1.01-cache-2.11-cpan-5dc5da66d9d )