pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.
Date: Wed, 26 Apr 2017 13:53:10 -0700
Message-ID: <5f3b0581-8c2d-8323-73c7-e917da54c96c@hogranch.com> (raw)
In-Reply-To: <5752C491-B0EC-4D1E-AF97-5E1C8C793A8A@gmail.com>
References: <20170426182322.24371.95224@wrigleys.postgresql.org>
	<CAKFQuwZ+PXKFrQ+LqOOorfva9nMesie0WQpe_hJTdkMn7vCZAw@mail.gmail.com>
	<5752C491-B0EC-4D1E-AF97-5E1C8C793A8A@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

view thread (25+ messages)  latest in thread

Message-ID: <5f3b0581-8c2d-8323-73c7-e917da54c96c@hogranch.com>
Permalink:  ../5f3b0581-8c2d-8323-73c7-e917da54c96c@hogranch.com/
Also on:    postgresql.org/message-id/5f3b0581-8c2d-8323-73c7-e917da54c96c@hogranch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pierce@hogranch.com
  Subject: Re: BUG #14632: Plus and minus operators inconsistency with leap years and year intervals.
  In-Reply-To: <5f3b0581-8c2d-8323-73c7-e917da54c96c@hogranch.com>
  References: <20170426182322.24371.95224@wrigleys.postgresql.org> <CAKFQuwZ+PXKFrQ+LqOOorfva9nMesie0WQpe_hJTdkMn7vCZAw@mail.gmail.com> <5752C491-B0EC-4D1E-AF97-5E1C8C793A8A@gmail.com> <5f3b0581-8c2d-8323-73c7-e917da54c96c@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox