Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://871980]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-11-18 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?