Re: Broken(?) 'interval' problems. [Was: ISO 8601 "Time Intervals"] - Mailing list pgsql-hackers

From Ron Mayer
Subject Re: Broken(?) 'interval' problems. [Was: ISO 8601 "Time Intervals"]
Date
Msg-id POEDIPIPKGJJLDNIEMBEKEFKDJAA.ron@intervideo.com
Whole thread Raw
In response to Re: Broken(?) 'interval' problems. [Was: ISO 8601 "Time Intervals"]  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-hackers
Bruno wrote:
> ...An interval has two parts... the number of months...and...the number of 
> seconds...if both parts are nonzero it makes a difference in which part 
> gets added first. For example '2003-02-28'::date + '1 month 1 day'::interval
> might be either 2003-03-29 or 2003-04-01. In 7.4 it is currently 2003-03-29,

Ah.. I understand.

At least one other application that does date math, MSFT Excel
also claims 2003-03-29 when I use the expression "=DATE(YEAR(B3),MONTH(B3)+1,DAY(B3)+1)"
so I think that's a reasonable rule to keep.

Anyone, please let me know if there are good reasons such as
standards or other major applications that behave otherwise.


Thanks for this other interesting case that I need to worry about!

And yes, I'll document it as well. :-)
  Ron

PS: I'm not receiving some emails I send to hackers. If you   need a timely answer please cc me -- though I will follow
 the thread on archives as well to catch anything I miss.
 



pgsql-hackers by date:

Previous
From: Philip Yarra
Date:
Subject: Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Next
From: Doug McNaught
Date:
Subject: Re: massive quotes?