Re: [Fwd: DateTime::Duration comparisions]

2003-11-15 Thread Rick Measham
Doug Treder wrote: The fuzzy logic that was being described earlier on the list is more attractive. There are definitely edge cases where two durations cannot be compared and should throw exception. But most of the spectrum is actually comparable, depending on the units being compared: 30

Re: [Fwd: DateTime::Duration comparisions]

2003-11-15 Thread Max Maischein
Dave Rolsky wrote: I guess this boils down to four choices: 1) give an arbitrary answer 2) give a reasonable answer that may depend on the current time (add both durations to the current time and compare the resulting times) 3) give an answer if it is correct for all times, throw an exception

Re: [Fwd: DateTime::Duration comparisions]

2003-11-15 Thread Dave Rolsky
On Sat, 15 Nov 2003, Max Maischein wrote: PS: I didn't know that this was some hornets nest I stirred up again - it was just a problem I wanted to solve for myself ... Almost every facet of DateTime stuff is a hornet's nest. It seems simple at first, but the deeper you get into it, the

Re: [Fwd: DateTime::Duration comparisions]

2003-11-14 Thread Jonathan Swartz
@ perl . org [EMAIL PROTECTED] Sent: Friday, November 14, 2003 4:49 PM Subject: Re: [Fwd: DateTime::Duration comparisions] The fuzzy logic that was being described earlier on the list is more attractive. There are definitely edge cases where two durations cannot be compared and should throw

Re: [Fwd: DateTime::Duration comparisions]

2003-11-14 Thread Dave Rolsky
On Fri, 14 Nov 2003, Jonathan Swartz wrote: I guess this boils down to four choices: 1) give an arbitrary answer 2) give a reasonable answer that may depend on the current time (add both durations to the current time and compare the resulting times) 3) give an answer if it is correct for

Re: [Fwd: DateTime::Duration comparisions]

2003-11-14 Thread Joshua Hoblitt
On Fri, 14 Nov 2003, Dave Rolsky wrote: I don't mind the idea of adding a compare() class method that accepts a base datetime and uses DateTime-now, per Rick's suggestion. I proposed something just short of this *months* ago and nobody even responded to my RFC. DT::Q could be either used by

Re: [Fwd: DateTime::Duration comparisions]

2003-11-13 Thread Max Maischein
(I am too stupid - I forgot to CC the list) Original Message Subject: Re: [Fwd: DateTime::Duration comparisions] Date: Thu, 13 Nov 2003 10:16:25 +0100 From: Max Maischein [EMAIL PROTECTED] To: Dave Rolsky [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] Dave

[Fwd: DateTime::Duration comparisions]

2003-11-12 Thread Max Maischein
This was originally to Dave directly. A second mail with a tentative patch that somewhat fixes the problem discussed below follows in a second mail (that I also sent to Dave directly and will forward separately). Please comment but CC me, as I don't follow the list! -max Original

Re: [Fwd: DateTime::Duration comparisions]

2003-11-12 Thread Dave Rolsky
On Tue, 11 Nov 2003, Max Maischein wrote: I saw in the CHANGES file that you added some other delta_* methods, but didn't find them in the documentation, so I don't know about these, and was too lazy to delve into the source for this :-) These are for DateTime objects. I'm now regretting the