Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals.

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals.
Дата
Msg-id 5f3b0581-8c2d-8323-73c7-e917da54c96c@hogranch.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.  (Pietro Pugni <pietro.pugni@gmail.com>)
Ответы Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals.  (John R Pierce <pierce@hogranch.com>)
Список pgsql-bugs
On 4/26/2017 1:30 PM, Pietro Pugni wrote:
Adding 10 years to 1912-02-29 returns 1922-02-29, as expected.
I would like to apply the reverse operation. To do so, I subtract 10 years from 1922-02-29 but I obtain 1912-02-28, so the math is actually wrong.


assuming 1922 was a leap year, 1912 is NOT a leap year, so therefore there is no 1912-02-29, that is an invalid date.



-- 
john r pierce, recycling bits in santa cruz

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Pietro Pugni
Дата:
Сообщение: Re: [BUGS] BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [BUGS] BUG #14632: Plus and minus operators inconsistency withleap years and year intervals.