Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XmlH2-0004ql-OL for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Nov 2014 15:16:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XmlH2-00014f-96 for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Nov 2014 15:16:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XmlH1-00014Z-Cl for pgsql-bugs@postgresql.org; Fri, 07 Nov 2014 15:16:27 +0000 Received: from mail8.gmhwh.org ([216.49.179.98]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XmlGx-0003u9-Cy for pgsql-bugs@postgresql.org; Fri, 07 Nov 2014 15:16:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ldschurch.org; h=date : from : to : cc : subject : message-id : reply-to : references : mime-version : content-type : in-reply-to; s=nov2012; bh=ni7J8Wd4HX4j1KJl93WZnztVfBw3eL6d52rS+kTXoRo=; b=v2dKY1VRypP0841PSIOqBFNhv+bBRJ4/o5q7a74NHvJpjzu0GrC3oWi+CO9FAcOkXQZt AM1JaxW1D54bOT8izEo+qDu/sINkxUP3DicLAdmG0O9v1r32kyAcBoj3eEUNygIPYh7L b0Ca+24kPHC00q3PQcFlv7rbSOTU9bTnWTklyUGX+weFLfAwugV4X6u6aVDTMFRuPukl gLIWsUaZHZiPCIuVfp3CaLoJHVhjOkkvkupZIM8B8Zq8N+3LlF/zJsepsHnu+XWbDjIT Qxj7FF/ZhWadBr1uz2Gy0rGWmUUeZbRMJXB0K5ro71mfE3F34zMqalsscNWkR7mh5lCQ Pg== Received: from W12118.ldschurch.org ([10.97.40.118]) by mail8.gmhwh.org (8.14.5/8.14.5) with ESMTP id sA7FGCWZ006517 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 7 Nov 2014 08:16:12 -0700 Received: from gr8.dev (10.98.250.245) by mail.ldschurch.org (10.97.40.118) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 7 Nov 2014 08:16:12 -0700 Date: Fri, 7 Nov 2014 08:16:11 -0700 From: Bruce Hunsaker To: Bruce Momjian CC: Bruce Hunsaker , Tom Lane , Magnus Hagander , , pgsql-bugs Subject: Re: BUG #11883: Year 1500 not treated as leap year when it was a leap year Message-ID: <20141107151611.GD4482@gr8.dev> Reply-To: References: <20141105175607.26929.23188@wrigleys.postgresql.org> <20141105180225.GB10345@momjian.us> <15535.1415211201@sss.pgh.pa.us> <20141106073451.GA4253@momjian.us> <20141106142949.GA4487@gr8.dev> <20141107070257.GA29045@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20141107070257.GA29045@momjian.us> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.98.250.245] X-Disclaimer: True X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52, 1.0.28, 0.0.0000 definitions=2014-11-07_06:2014-11-07,2014-11-07,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.000414061557999336 urlsuspect_oldscore=0.00349707444754311 suspectscore=0 recipient_domain_to_sender_totalscore=33689 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=31826 rbsscore=0.000414061557999336 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.3 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1411070123 X-Pg-Spam-Score: -1.3 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 07 Nov 14 02 02, Bruce Momjian wrote: > On Thu, Nov 6, 2014 at 07:29:49AM -0700, Bruce Hunsaker wrote: > > > I have applied the attached C comment to document why we use the > > > Gregorian calendar for pre-1582 years. > > > > Thanks everyone for the response. I guess the bottom line for us > > is that if we want to store dates before 1582, we may not want > > to use date or timestamp columns for that data, particularly if > > the dates are from a Julian calendar. > > Yeah, the big problem is that there is no way to store leap days for > years like 1500. The only good part is that the Gregorian calendar is > very good at keeping the calendar aligned with the seasons. Just to add some additional background, We were migrating data from an Oracle DB when we hit this. Oracle's dates are Julian based and range from Jan 1, 4712 BCE to Dec 31 9999 CE. So Feb 29, 1500 is a valid date in an Oracle Date type (Julian day 2268992). So I wonder what the rules might be to convert a Julian date to a 'proleptic Gregorian' date (pre 1582) and vice versa? -- Bruce Hunsaker NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs