Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Getting the current week number

by matija (Priest)
on Jun 20, 2004 at 05:22 UTC ( #368242=note: print w/replies, xml ) Need Help??

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:
$secs=time; $date = &ParseDateString("epoch $secs"); $week=UnixDate($date,"%W");
Note that you have:
%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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://368242]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2016-10-26 20:47 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (347 votes). Check out past polls.