Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Dates BC.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Dann Corbit <DCorbit(at)connx(dot)com>, Kurt Roeckx <Q(at)ping(dot)be>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Dates BC.
Date: 2004-03-29 20:37:07
Message-ID: 200403292037.i2TKb7q13536@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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.  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 it  works,
>  because tm2timestamp() and date2j() work with zero year.

I have also add a doc mention to my patch that mentions that there is no
0 AD, and therefore subtraction of BC years from AD years must be done
with caution.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Manfred KoizarDate: 2004-03-29 22:42:54
Subject: Re: PostgreSQL block size vs. LVM2 stripe width
Previous:From: Tom LaneDate: 2004-03-29 20:23:34
Subject: Re: int2[] vs int2vector in pg_catalog?

pgsql-patches by date

Next:From: Christopher Kings-LynneDate: 2004-03-30 03:37:45
Subject: pg_dump end comment
Previous:From: Bruce MomjianDate: 2004-03-29 18:23:32
Subject: Re: [HACKERS] Dates BC.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group