|Perl Monk, Perl Meditation|
Re: How do you add dates to a certain user provided date?by AcidHawk (Vicar)
|on Mar 10, 2004 at 07:31 UTC||Need Help??|
I like the idea of converting to epoc time. And you can do this with core the Time::Local module.
You still face a challenge in that the year is not in ccyy format. So you need to work out is it 1904 or 2004 that you are dealing with.
Let's assume that you adddress this year problem and that based on your comment that this is not homework, look at this to convert the date from mm/dd/ccyy to epoc.
You could then take $epoc and add ($num_of_days_to_add * 86400) which is the number of seconds in a day. All that's left to do is convert this new epoc number to a valid date.
You can now build how you want to diaplsy your new date. Something like..
Of all the things I've lost in my life, its my mind I miss the most.