X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 989EE475A80; Tue, 25 Feb 2003 05:13:09 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 62551-01; Tue, 25 Feb 2003 05:12:58 -0500 (EST) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by postgresql.org (Postfix) with ESMTP id 75EF7475ECE; Tue, 25 Feb 2003 02:03:18 -0500 (EST) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 18nZ7S-0000gl-0Y; Tue, 25 Feb 2003 07:03:14 +0000 Received: from localhost ([127.0.0.1] ident=olly) by linda.lfix.co.uk with esmtp (Exim 3.36 #1 (Debian)) id 18nZ7R-0006vm-00; Tue, 25 Feb 2003 07:03:13 +0000 Subject: Re: [BUGS] Date Return must be As per Natural Calander From: Oliver Elphick To: Robert Treat Cc: Aspire Something , pgsql-admin@postgresql.org, pgsql-bugs@postgresql.org In-Reply-To: <1046127599.1015.318.camel@camel> References: <001301c2db58$29f7b5e0$c9c832c0@societykotla> <1046127599.1015.318.camel@camel> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1046156593.9028.83.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Feb 2003 07:03:13 +0000 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/384 X-Sequence-Number: 7582 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