Re: [HACKERS] Gregorian Calendar - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: [HACKERS] Gregorian Calendar
Date
Msg-id 37135951.88FDB948@alumni.caltech.edu
Whole thread Raw
In response to Gregorian Calendar  (José Soares <jose@sferacarta.com>)
List pgsql-general
> I have a question about dates.
> The Gregorian reform of calendar skiped 10 days on Oct, 1582.
> This reform was accepted by Great Britain and Dominions (including
> what is now the USA) only in 1752.
> If I insert a date that doesn't exist PostgreSQL accepts it.
> Should it be considered normal ?

As Peter says, this is tricky.

Date conventions before the 19th century make for interesting reading,
but are not imho consistant enough to warrant coding into a date/time
handler.

As you probably have noticed, we use Julian date calculations for our
date/time support. They have the nice property of correctly
predicting/calculating any date more recent than something like 4013BC
to far into the future, using the assumption that the length of the
year is 365.25 days. This is a very recently adopted convention
(sometime in the 1800s I had thought, but perhaps it was during the
same "reform" in 1752).

I've toyed with the idea of implementing a Chinese dynastic calendar,
since it seems to be more predictable than historical European
calendars.

                       - Tom

--
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California

pgsql-general by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Re: [GENERAL] leap day bug after 1901
Next
From: De Leersnijder Frederic
Date:
Subject: Opening two databases at the same time?