I couldn't find anything about this in the documentation. I can
understand
after some reflection why you shouldn't be able to compare durations
(e.g.
how would you compare 30 days to 1 month), but it seems like this should
be
documented, and using comparison operator should fail. Let me
I was trying to compare two durations, and came up with some surprises.
DB1 use DateTime;
DB2 $hour = DateTime::Duration-new(hours=1);
DB3 $minute = DateTime::Duration-new(minutes=1);
# Try comparing $hour and $minute
DB4 print ($hour $minute)
1 # Wh??
# Try subtracting and
On Sat, 8 Nov 2003, Jonathan Swartz wrote:
I was trying to compare two durations, and came up with some surprises.
DB1 use DateTime;
DB2 $hour = DateTime::Duration-new(hours=1);
DB3 $minute = DateTime::Duration-new(minutes=1);
# Try comparing $hour and $minute
DB4 print ($hour