in reply to Getting the current week number
Whenever I need some operation involving dates, I immediately turn to Date::Manip. In this case, I think the code would go something like this:
Note that you have:$secs=time; $date = &ParseDateString("epoch $secs"); $week=UnixDate($date,"%W");
%U week of year, Sunday as first day of week - 01 to 53 %W week of year, Monday as first day of week - 01 to 53
|
---|
In Section
Seekers of Perl Wisdom