Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Date and time difference

by Ratazong (Monsignor)
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

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 perusing the Monastery: (6)
As of 2016-10-23 16:15 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.