Re: [ADMIN] Date Return must be As per Natural Calander - Mailing list pgsql-bugs

From Oliver Elphick
Subject Re: [ADMIN] Date Return must be As per Natural Calander
Date
Msg-id 1046156593.9028.83.camel@linda.lfix.co.uk
Whole thread Raw
In response to Re: [ADMIN] Date Return must be As per Natural Calander  (Robert Treat <xzilla@users.sourceforge.net>)
Responses Re: [ADMIN] Date Return must be As per Natural Calander
List pgsql-bugs
On Mon, 2003-02-24 at 22:59, Robert Treat wrote:
> [rob@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.Elphick@lfix.co.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


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug #903: Performance Hangs during Lookups
Next
From: Oliver Elphick
Date:
Subject: Re: [ADMIN] Date Return must be As per Natural Calander