Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2014-08-21 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (143 votes), past polls