Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPpJ3-0004zC-Lt for pgsql-general@arkaria.postgresql.org; Sun, 21 Aug 2022 18:04:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oPpJ2-0008RV-EA for pgsql-general@arkaria.postgresql.org; Sun, 21 Aug 2022 18:04:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPpJ2-0008RL-3v for pgsql-general@lists.postgresql.org; Sun, 21 Aug 2022 18:04:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oPpJ0-0005yH-GU for pgsql-general@lists.postgresql.org; Sun, 21 Aug 2022 18:04:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27LI4CRD4161385; Sun, 21 Aug 2022 14:04:12 -0400 From: Tom Lane To: "Watzinger, Alexander" cc: "pgsql-general@lists.postgresql.org" Subject: Re: Support for dates before 4713 BC In-reply-to: References: Comments: In-reply-to "Watzinger, Alexander" message dated "Sat, 20 Aug 2022 14:05:42 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4161383.1661105052.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 21 Aug 2022 14:04:12 -0400 Message-ID: <4161384.1661105052@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Watzinger, Alexander" writes: > Any chance to add support for dates before 4713 BC? We really would appr= eciate 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 exac= t 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). regards, tom lane [1] https://en.wikipedia.org/wiki/Julian_day