in reply to adding/subtracting calender dates

Pardon me for asking stupid questions, but what's wrong with timestamps and localtime()? For instance, to get the date / time of 7 days ago:
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t +ime() - 7*86400);
If you're going to give an example of what your code can do, it needs to be something that can't be achieved just as easily using built-in Perl functions.

Replies are listed 'Best First'.
Re^2: adding/subtracting calender dates
by polettix (Vicar) on Jun 02, 2005 at 22:55 UTC
    It would require some care during DST change, because one day would last a hour more/less.

    Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

    Don't fool yourself.