logo       

Re: [ADMIN] Date Return must be As per Natural Calander: msg#00125

db.postgresql.bugs

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

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@xxxxxxxxxx
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


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise