Re: comparing durations

2003-11-10 Thread Jonathan Swartz
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

comparing durations

2003-11-09 Thread Jonathan Swartz
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

Re: comparing durations

2003-11-09 Thread Dave Rolsky
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