Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Date and time difference

by Ratazong (Prior)
on Nov 17, 2010 at 12:12 UTC ( #871980=note: print w/ replies, xml ) Need Help??

in reply to Date and time difference

What about the following approach:

  • use Date::Calc for convenient date-calculations, including leap-year-support etc.
  • extract year, month, day ... from your dates (e.g. by using a regex)
  • increase your date by one in a loop (using Add_Delta_DHMS)
    • if the new date is equal to the end-date, end the program
    • else transform the new date in your format, print it and continue your loop
HTH, Rata

Comment on Re: Date and time difference
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2015-11-27 10:02 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (722 votes), past polls