Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
Do you know where your variables are?
 
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 drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-04-18 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (472 votes), past polls