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

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: [ADMIN] Date Return must be As per Natural Calander
Дата
Msg-id 20030225171559.GA13465@wallace.ece.rice.edu
обсуждение исходный текст
Ответ на Re: [ADMIN] Date Return must be As per Natural Calander  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Michael Peddemors
Дата:
Сообщение: Bug or Performance Issue?
Следующее
От: Tim Ellis
Дата:
Сообщение: Re: [ADMIN] Date Return must be As per Natural Calander