Date::WeekOfYear

Simple routine to return the week of the year (as well as the year)
Download

Date::WeekOfYear Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Greg George
  • Publisher web site:
  • http://search.cpan.org/~gng/

Date::WeekOfYear Tags


Date::WeekOfYear Description

Simple routine to return the week of the year (as well as the year) Date::WeekOfYear is a small and efficient Perl module. The only purpose is to return the week of the year. This can be called in either a scalar or list context.In a scalar context, just the week number is returned (the year starts at week 1).In a list context, both the week number and the year (YYYY) are returned. This ensures that you know which year the week number relates too. This is only an issue in the week where the year changes (ie depending on the day you can be in either week 52 or week 1.Note there if you are after other date related functions then there are plenty of other Date::* modules on CPAN provide the functionality of this module in addition other ...SYNOPSIS use Date::WeekOfYear; # Get the week number (and year for the end/start of year transitions) my ($wkNo, $year) = WeekOfYear(); # Get the week number for the time passed in time_stamp my ($wkNo, $year) = WeekOfYear($time_stamp); # Use the data for someThing ... my $logFile = "/someDir/$year/someApp_$wkNo.log" # Only want the week number, don't care which year in the week around # the end/start of the year ! my $weekNo = WeekOfYear(); Requirements: · Perl


Date::WeekOfYear Related Software