Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Date difference?

by davorg (Chancellor)
on Apr 29, 2002 at 08:18 UTC ( [id://162785]=note: print w/replies, xml ) Need Help??


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>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://162785]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found