Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xo0hR-0006NF-2m for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Nov 2014 01:56:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xo0hQ-0003L5-Js for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Nov 2014 01:56:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xo0hQ-0003Ky-0r for pgsql-bugs@postgresql.org; Tue, 11 Nov 2014 01:56:52 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xo0hL-0002RN-Ov for pgsql-bugs@postgresql.org; Tue, 11 Nov 2014 01:56:50 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Xo0hB-0007U4-PY; Mon, 10 Nov 2014 20:56:37 -0500 Date: Mon, 10 Nov 2014 20:56:37 -0500 From: Bruce Momjian To: Tom Lane Cc: Alvaro Herrera , Bruce Hunsaker , Magnus Hagander , hunsakerbn@familysearch.org, pgsql-bugs Subject: Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year Message-ID: <20141111015637.GB27554@momjian.us> References: <20141105175607.26929.23188@wrigleys.postgresql.org> <20141105180225.GB10345@momjian.us> <15535.1415211201@sss.pgh.pa.us> <20141106073451.GA4253@momjian.us> <20141106142949.GA4487@gr8.dev> <20141107070257.GA29045@momjian.us> <20141107132503.GM1791@alvin.alvh.no-ip.org> <3189.1415372786@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3189.1415372786@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Fri, Nov 7, 2014 at 10:06:26AM -0500, Tom Lane wrote: > 5. A side issue that's probably pretty relevant for the OP's application > is that not every country adopted the Gregorian calendar at the same time. > Really if he wants any data integrity he's going to need to store an > explicit indication of whether a date is in Julian or Gregorian calendar. > (In a world of infinite manpower you could imagine extending the zic > database to provide information about which calendar was used when in > every region, but I don't see us going there.) Oh, it is worse than the date of the switch to Gregorian --- Russia had some really odd calendars: http://novaonline.nvcc.edu/eli/evans/his241/Notes/Calendar.html So, roughly speaking, in the nineteenth century, the Russian calendar was 12 days behind the Western European calendar. http://en.wikipedia.org/wiki/Soviet_calendar The Soviet calendar added five- and six-day work weeks between 1929 and 1940 to the Gregorian calendar adopted by Russia in 1918. Many Russian events, even those in the 20th century, have multiple dates for a single day/event, based on the calendar system used. We could figure out a way to relax our code to allow for leap year handling for pre-1582 dates, but the larger issue is that date calculations would also be affected by the existance of such Julian-only leap days, whether you stored those dates or not, meaning this change would affect everyone, not just those who want to store such dates. For example, should: SELECT '1500-03-01'::date - '1500-02-28'::date; return 1 or 2? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs