Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: date subtraction

by tomhukins (Curate)
on Jul 05, 2004 at 17:10 UTC ( #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
Node Status?
node history
Node Type: note [id://371943]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2021-01-25 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?