Re: FEATURE REQUEST - More dynamic date type?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Chris McCormick <cmccormick(at)thestate(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: FEATURE REQUEST - More dynamic date type?
Date: 2002-06-14 21:45:39
Message-ID: 20020614214539.GA13910@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 13, 2002 at 11:39:55 -0400,
Chris McCormick <cmccormick(at)thestate(dot)com> wrote:
> Thanks for reading. A few disclaimers:
>
> MY PROBLEM - Because this site deals with, among other things, ancient
> art, acheaology, and anthropology, I need a way to handle dates as
> specific as a single day, and as far back as 100,000 BC. According to
> the docs (I looked at
> http://www.postgresql.org/idocs/index.php?datatype-datetime.html), the
> farthest back any date type reaches is 4713 BC. So far, I have tried to
> deal with this problem by creating a numeric field for the year, and
> radio buttons for AD/BC. I then do a lot of form validation. Not only
> that, if I want to be as specific as a month or a day, then those are
> separate fields on my forms. Plus, I can't combine all of the fields
> and put them into a pg data type, because once again, they don't extend
> that far back. So, I have to maintain and validate the year, month, and
> days fields separately. Then imagine what I have to do if a user wants
> to _sort_ by date, or select events by date range!

Is there really a standard for how long individual months were in 100000BC!
Can't you use Julian dates for this? It is well defined (though conversion
to normal dates may not be that far back) and should be easy to work with.
(There may be problems if you go back so far that you need to worry about
days not really being 24 hours long.)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nigel J. Andrews 2002-06-14 22:09:49 Re: I must be blind...
Previous Message Tom Lane 2002-06-14 21:35:58 Re: I must be blind...