Re: FEATURE REQUEST - More dynamic date type? - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: FEATURE REQUEST - More dynamic date type?
Date
Msg-id 20020614214539.GA13910@wolff.to
Whole thread Raw
In response to FEATURE REQUEST - More dynamic date type?  ("Chris McCormick" <cmccormick@thestate.com>)
List pgsql-hackers
On Thu, Jun 13, 2002 at 11:39:55 -0400, Chris McCormick <cmccormick@thestate.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.)


pgsql-hackers by date:

Previous
From: Bill Cunningham
Date:
Subject: Re: Big Test Environment Feature
Next
From: "Rod Taylor"
Date:
Subject: Re: Making serial survive pg_dump