in reply to Date difference?

Coming a bit late to this thread, but I just need to add a plug forMatts' criminally underused Time::Piece module. If you subtract one Time::Piece object from another, then the result is a Time::Seconds object which can be displayed in various ways. An example from the docs:

use Time::Object; use Time::Seconds; my $t = localtime; $t += ONE_DAY; my $t2 = localtime; my $s = $t - $t2; print "Difference is: ", $s->days, "\n";

Replies are listed 'Best First'.
Re: Re: Date difference?
by wilstephens (Acolyte) on Apr 29, 2002 at 11:19 UTC
    ++! I didn't know about that one. Very useful - thank you for the link!

    --
    Wiliam Stephens <wil@stephens.org>