Perl Monk, Perl Meditation | |
PerlMonks |
Re: date subtractionby tomhukins (Curate) |
on Jul 05, 2004 at 17:10 UTC ( [id://371943]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|