Dates BC.

From: Kurt Roeckx <Q(at)ping(dot)be>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Dates BC.
Date: 2003-12-18 13:11:20
Message-ID: 20031218131120.GA11684@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 = -(tm->tm_year - 1);

It this normal or a bug?

Kurt

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-12-18 13:40:58 Re: ecpg tests compile failure
Previous Message Shridhar Daithankar 2003-12-18 13:06:04 Re: ecpg tests compile failure