Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: date subtraction

by tomhukins (Curate)
on Jul 05, 2004 at 17:10 UTC ( [id://371943]=note: print w/replies, xml ) Need Help??


in reply to date subtraction

Perl's DateTime project aims to produce a comprehensive suite of modules for dealing with dates and times. Historically, such modules in Perl often perform well at certain tasks, but badly at others.

DateTime overloads the addition and subtraction operators, so you can find the difference between two dates with $duration = $end - $start, where $end and $start are DateTime objects and $duration is a DateTime::Duration object.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-24 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found