RE: [HACKERS] Gregorian Calendar

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: José Soares <jose(at)sferacarta(dot)com>, hackers <pgsql-hackers(at)postgresql(dot)org>, general <pgsql-general(at)postgresql(dot)org>
Subject: RE: [HACKERS] Gregorian Calendar
Date: 1999-04-12 08:56:20
Message-ID: A9DCBD548069D211924000C00D001C441CE108@exchange.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Because most of my own code is Astronomical based, any of my time code
treats the skipped days in 1582 as invalid.

However, I think we should be careful with postgres, as anyone who is
storing dates for historical purposes, may be recording the dates for a
region who didn't change on that date (ie GB, or even worse Russia who
didn't change until 1919!)

This is a tricky question.

Peter

--
Peter T Mount, IT Section
petermount(at)it(dot)maidstone(dot)gov(dot)uk
Anything I write here are my own views, and cannot be taken as the
official words of Maidstone Borough Council

-----Original Message-----
From: José Soares [mailto:jose(at)sferacarta(dot)com]
Sent: Monday, April 12, 1999 9:42 AM
To: hackers; general
Subject: [HACKERS] Gregorian Calendar

Hi all,

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.
This is way we have Sep, 1752 like this:

$ cal 9 1752

September 1752
S M Tu W Th F S
1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

If I insert a date that doesn't exist PostgreSQL accepts it.
Should it be considered normal ?

prova=> insert into test values('1752-09-10');
INSERT 403408 1
prova=> select * from test;
date
----------
1752-09-10
(1 rows)

José

Browse pgsql-general by date

  From Date Subject
Next Message Frédéric Bultot 1999-04-12 09:22:52
Previous Message José Soares 1999-04-12 08:42:13 Gregorian Calendar