Re: [BUGS] Date Return must be As per Natural Calander

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Aspire Something <aspire420(at)hotpop(dot)com>, pgsql-admin(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] Date Return must be As per Natural Calander
Date: 2003-02-25 07:03:13
Message-ID: 1046156593.9028.83.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-bugs

On Mon, 2003-02-24 at 22:59, Robert Treat wrote:
> [rob(at)camel rms_db]$ cal 9 1752
> September 1752
> Su Mo Tu We Th Fr Sa
> 1 2 14 15 16
> 17 18 19 20 21 22 23
> 24 25 26 27 28 29 30
>
> I guess adding 1 day to 1752-09-02 should give us 1752-09-14, but your
> right, it gives us 1752-09-03.
>
> Forwarding this to -bugs

cal is only valid for Britain and British colonies (and still gets other
things wrong, because the previous year started on 25th March, but cal
doesn't know it). The date of change to the Gregorian calendar is
different for different countries. There was a discussion of this on
the patches list recently
(http://archives.postgresql.org/pgsql-patches/2003-02/msg00038.php and
the surrounding thread). The SQL spec calls for the Gregorian calendar
to be extended backwards.

The proper place for handling conversion to other calendars is through a
set of suitable functions, which haven't been written yet.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Peace I leave with you, my peace I give unto you; not
as the world giveth, give I unto you. Let not your
heart be troubled, neither let it be afraid."
John 14:27

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Oleg Samoylov 2003-02-25 11:42:52 Re: Vacuum Question
Previous Message Rajesh Kumar Mallah 2003-02-25 06:47:37 postings appearing twice...

Browse pgsql-bugs by date

  From Date Subject
Next Message Ross J. Reedstrom 2003-02-25 17:16:00 Re: [BUGS] Date Return must be As per Natural Calander
Previous Message Tom Lane 2003-02-25 05:44:21 Re: Bug #903: Performance Hangs during Lookups