Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: d-mmm-yyyy to DOY (day of year)

by bart (Canon)
on May 13, 2013 at 21:44 UTC ( #1033364=note: print w/ replies, xml ) Need Help??


in reply to d-mmm-yyyy to DOY (day of year)

A good starting point could be to use the module Date::Calc. A bit heavy, maybe, but it includes everything and the kitchen sink, including parsing dates, and the function Day_of_Year.

$doy = Day_of_Year($year,$month,$day);

If parsing dates doesn't work out so well without an explicit format, you can fall back on POSIX::strptime.


Comment on Re: d-mmm-yyyy to DOY (day of year)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2015-07-02 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (29 votes), past polls