nagesh has asked for the wisdom of the Perl Monks concerning the following question:
I want to be able to subtract and add the dates in my program,
example:- find a day 35 days before today. I could do that in a lengthy way, but I was wondering if there is a module that could make the coding easier and shorter.
I checked out with the Date::Calc module and found that it didn't have any function that could let me do that directly. The reason I need to add/subtract the days is I have the data files in the format $data_file="$DataDir/$month_names{$month}\_$day\_$year\.dat"; and I build html file today.html using the $data_file. I use localtime function to generate $month,$day and $year. If i don't find todays $data_file I have to use yesterday's data file or else day before yesterday data file to build today.html.
I appreciate your input.
Thank you,
nagesh
Edited 2001-12-13 by dvergin per author request
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date related question
by Beatnik (Parson) on Dec 14, 2001 at 03:22 UTC | |
|
Re: Date related question
by rbc (Curate) on Dec 14, 2001 at 03:54 UTC | |
|
(shockme) Re: Date related question
by shockme (Chaplain) on Dec 14, 2001 at 03:23 UTC | |
|
(Ovid - formatting) Re: Date related question
by Ovid (Cardinal) on Dec 14, 2001 at 03:44 UTC | |
by nagesh (Novice) on Dec 14, 2001 at 04:08 UTC | |
|
Re: Date related question
by nagesh (Novice) on Dec 14, 2001 at 03:41 UTC |