Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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 God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2017-02-19 18:51 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (293 votes). Check out past polls.