Re: [HACKERS] Gregorian Calendar
| От | Thomas Lockhart |
|---|---|
| Тема | Re: [HACKERS] Gregorian Calendar |
| Дата | |
| Msg-id | 37135951.88FDB948@alumni.caltech.edu обсуждение исходный текст |
| Ответ на | Gregorian Calendar (José Soares <jose@sferacarta.com>) |
| Список | 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 по дате отправления: