Re: [ADMIN] Date Return must be As per Natural Calander - Mailing list pgsql-bugs

From Ross J. Reedstrom
Subject Re: [ADMIN] Date Return must be As per Natural Calander
Date
Msg-id 20030225171559.GA13465@wallace.ece.rice.edu
Whole thread Raw
In response to Re: [ADMIN] Date Return must be As per Natural Calander  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Feb 24, 2003 at 11:06:38PM -0500, Tom Lane wrote:
> Robert Treat <xzilla@users.sourceforge.net> writes:
> > I guess adding 1 day to 1752-09-02 should give us 1752-09-14, but your
> > right, it gives us 1752-09-03.
>
> As was pointed out at length just recently, the transition from Julian
> to Gregorian calendars happened at different times in different places.
> So the above claim is only correct for some places.
>
> The conclusion from the previous discussion was that our existing
> behavior (extrapolate Gregorian rules backwards indefinitely) is as
> defensible as anything else that would be likely to get coded.

To quote SQL1992:

  4.5.3  Operations involving datetimes and intervals

  [...]
  Arithmetic operations involving items of type datetime or inter-
  val obey the natural rules associated with dates and times and
  yield valid datetime or interval results according to the Gregorian
  calendar.

Ross

pgsql-bugs by date:

Previous
From: Michael Peddemors
Date:
Subject: Bug or Performance Issue?
Next
From: Tim Ellis
Date:
Subject: Re: [ADMIN] Date Return must be As per Natural Calander