DateTime has a ->compare( $dt1, $dt2 ) method that returns -1 if $dt1 < $dt2, 0 if $dt1 == $dt2, 1 if $dt1 > $dt2. DateTime objects also overload the comparison operators (< > == etc.). To parse a string into a DateTime object, take a look at DateTime::Format::Strptime.
In reply to Re: How to compare two dates?
by Anonymous Monk
in thread How to compare two dates?
by CountOne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |