Is there a way (in the Korn Shell) to
accurately increment a date ?
Say for example that I awk out the following "
start_date" and "
end_date" (in the format below) from a file:
start_date = 10/25/2004
end_date = 11/12/2004
How do I increment from the
start_date to the
end_date ?
(also note the change in months for the dates it is also possible that the years
could be different)
I wuz given an example like this though :
Quote:
my_date=`TZ=EST-24 date` # where date is the system's date (assume that date returned Mon Oct 25 15:51:18 EST 2004)
echo $my_date # my_date returns Tue Oct 26 20:53:08 EST 2004
# Each time I subtract 24 the date is incremented
|
(The above seem to work but I don't really understand it)
For my purposes I could very well work with this "solution"....except for the little problem that the dates that I would be feeding the script would look like :
10/26/2004 NOT
Tue Oct 26 20:53:08 EST 2004
Is there a way to convert
10/26/2004 TO
Tue Oct 26 20:53:08 EST 2004