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.


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to