in reply to Date Manipulation
Of course there is a way to do this. Computers are pretty smart nowadays. :)
You might try a Google Codesearch for routines called yesterday, or even just a normal googling of search.cpan.org for yesterday
Since this sounds a lot like a homework problem, you probaby won't be able to get away with using Date::Simple:
use Date::Simple qw(today); $date = today() - 1; print $date;
or Date::Manip:
use Date::Manip; $date = ParseDate("yesterday"); print $date;
use Date::PeriodParser; $date = parse_period("yesterday"); print scalar localtime( $date );
or many other modules which can handle this sort of thing. You can always look at their source to see how they did it.
Good luck :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date Manipulation
by Corion (Patriarch) on Dec 17, 2006 at 21:07 UTC | |
by pajout (Curate) on Dec 18, 2006 at 11:39 UTC |