From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Bruce Hunsaker <hunsakerbn@ldschurch.org>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: hunsakerbn@familysearch.org
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year
Date: Mon, 10 Nov 2014 20:56:37 -0500
Message-ID: <20141111015637.GB27554@momjian.us> (raw)
In-Reply-To: <3189.1415372786@sss.pgh.pa.us>
References: <20141105175607.26929.23188@wrigleys.postgresql.org>
<20141105180225.GB10345@momjian.us>
<CABUevEzP=g=O=Nmg+DMjwCL+74WsnPdTb98vbs6sSbQq_kdASw@mail.gmail.com>
<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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 <bruce@momjian.us> 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
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: bruce@momjian.us, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, hunsakerbn@ldschurch.org, magnus@hagander.net, hunsakerbn@familysearch.org
Subject: Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year
In-Reply-To: <20141111015637.GB27554@momjian.us>
References: <20141105175607.26929.23188@wrigleys.postgresql.org> <20141105180225.GB10345@momjian.us> <CABUevEzP=g=O=Nmg+DMjwCL+74WsnPdTb98vbs6sSbQq_kdASw@mail.gmail.com> <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> <20141111015637.GB27554@momjian.us>
* 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