in reply to Dates difference
I had to do that recently.
FWIW ... i wrote some Date::Calc code and decided to use the above code instead.use Time::Local; my $now = timelocal(localtime); my $mtime = (stat $file)[9]; my $delta = ($now - $mtime) / (60 * 60 * 24);
UPDATE: Corion to the rescue again. :) (That means i learned something too. Yes ... -C works fine, in fact, it works better than fine. I just wish i knew about that last week when i wasted 10 minutes writing that snippet. ;))
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dates difference
by gl2103 (Novice) on May 23, 2005 at 20:45 UTC |