Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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
Comment on Re: Getting the current week number
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2016-05-27 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?