Re: [BUGS] Date Return must be As per Natural Calander

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Aspire Something <aspire420(at)hotpop(dot)com>, pgsql-admin(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] Date Return must be As per Natural Calander
Date: 2003-02-25 17:16:00
Message-ID: 20030225171559.GA13465@wallace.ece.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-bugs

On Mon, Feb 24, 2003 at 11:06:38PM -0500, Tom Lane wrote:
> Robert Treat <xzilla(at)users(dot)sourceforge(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ross J. Reedstrom 2003-02-25 17:24:33 Re: postings appearing twice...
Previous Message Robert Treat 2003-02-25 15:54:19 Re: PLSQL

Browse pgsql-bugs by date

  From Date Subject
Next Message Tim Ellis 2003-02-25 22:08:44 Re: [BUGS] Date Return must be As per Natural Calander
Previous Message Oliver Elphick 2003-02-25 07:03:13 Re: [BUGS] Date Return must be As per Natural Calander