I have applied a patch to fix the issues mentioned below. Thanks.
---
Karel Zak wrote:
On Fri, Dec 19, 2003 at 01:12:08AM -0800, Dann Corbit wrote:
There is no zero calendar year. The first year of Anno Domini is 1.
On Thu, Dec 18, 2003 at 02:11:20PM +0100, Kurt Roeckx wrote:
I find this a little strange:
select date_part('year', '0002-01-01 BC'::date);
date_part
---
-1
It seems 1 BC and 0 are the same year.
Is there connection between formatting.c and date_part() ?
I don't
There is no zero calendar year. The first year of Anno Domini is 1. It's ordinal,
not cardinal.
-Original Message-
From: Karel Zak [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 12:04 AM
To: Kurt Roeckx
Cc: [EMAIL PROTECTED]
Subject: Re: [HACKERS] Dates BC
On Fri, Dec 19, 2003 at 01:12:08AM -0800, Dann Corbit wrote:
There is no zero calendar year. The first year of Anno Domini is 1. It's ordinal,
not cardinal.
I agree. But the follow quoted code is not use in date_part() there
Kurt found bug. It's used in to_timestamp() _only_, and
I find this a little strange:
select date_part('year', '0002-01-01 BC'::date);
date_part
---
-1
It seems 1 BC and 0 are the same year.
In backend/utils/adt/formatting.c:
if (tmfc.bc)
{
if (tm-tm_year 0)
tm-tm_year =
Kurt Roeckx wrote:
I find this a little strange:
select date_part('year', '0002-01-01 BC'::date);
date_part
---
-1
It seems 1 BC and 0 are the same year.
In backend/utils/adt/formatting.c:
if (tmfc.bc)
{
if (tm-tm_year 0)
In article [EMAIL PROTECTED] you wrote:
I find this a little strange:
select date_part('year', '0002-01-01 BC'::date);
date_part
---
-1
It seems 1 BC and 0 are the same year.
There is an unresolveable legacy problem here, in that Brahmagupta did
not yet invent the