Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Getting the current week number

by matija (Priest)
on Jun 20, 2004 at 05:22 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-19 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found