Re: Support for dates before 4713 BC

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Watzinger, Alexander" <Alexander(dot)Watzinger(at)oeaw(dot)ac(dot)at>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Support for dates before 4713 BC
Date: 2022-09-12 14:40:09
Message-ID: CANbhV-F8mZzt0Xdc55XJPzHhy_27MsG_ZnRv_VY0OjdwyNDZaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 21 Aug 2022 at 19:04, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Watzinger, Alexander" <Alexander(dot)Watzinger(at)oeaw(dot)ac(dot)at> writes:
> > Any chance to add support for dates before 4713 BC? We really would appreciate that.
>
> I'm a little skeptical of the value of applying the Gregorian calendar
> before 1582 AD, let alone thousands of years before the Romans invented
> anything looking even vaguely like it.
>
> Are you sure there's going to be any point whatsoever in trying to name
> individual days that far back? ISTM you'd be lucky to assign a year
> accurately.
>
> > The 4713 BC limit feels very arbitrary, what is the reason for this exact limit?
>
> There are existing equations for calculating Gregorian month/day/year from
> Julian day count [1]. They work back to Julian day zero, at least if
> you grant that proleptic Gregorian dates are sensible that far back.
> Nobody around here has looked into whether they'd work for negative Julian
> day numbers (I suspect not though, at least not without work that seems
> rather pointless).

Sounds reasonable. So the 4713BC limit applies because of the
resolution of 1 day.

Could we allow dates earlier than that, as long as we fix them to the
1st day of any particular month, so the effective resolution becomes
"1 month" before 4713BC? (With various and appropriate restrictions).

--
Simon Riggs http://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sebastien Flaesch 2022-09-12 14:40:16 Re: Resolving host to IP address
Previous Message Francisco Olarte 2022-09-12 14:17:55 Re: Resolving host to IP address