Return-Path: X-Original-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE1D9D11F for ; Fri, 27 Jul 2012 15:40:56 +0000 (UTC) Received: (qmail 57155 invoked by uid 500); 27 Jul 2012 15:40:56 -0000 Delivered-To: apmail-incubator-ooo-issues-archive@incubator.apache.org Received: (qmail 57122 invoked by uid 500); 27 Jul 2012 15:40:56 -0000 Mailing-List: contact ooo-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-issues@incubator.apache.org Delivered-To: mailing list ooo-issues@incubator.apache.org Received: (qmail 57114 invoked by uid 99); 27 Jul 2012 15:40:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2012 15:40:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.86.89.67] (HELO elasmtp-scoter.atl.sa.earthlink.net) (209.86.89.67) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2012 15:40:51 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=pjX5uP4BRQOofyfTgCdTQG/MLicfPqbsAuw3J4/BWI9tX+Agq3xGO89E2vguFhm/; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP; Received: from [24.40.130.18] (helo=[192.168.1.111]) by elasmtp-scoter.atl.sa.earthlink.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1SumeU-0005Vf-GA for ooo-issues@incubator.apache.org; Fri, 27 Jul 2012 11:40:30 -0400 Message-ID: <5012B671.7020006@earthlink.net> Date: Fri, 27 Jul 2012 11:40:33 -0400 From: Terry Crook User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: ooo-issues@incubator.apache.org Subject: Re: [Bug 120390] New: Function MONTH gives wrong result for many dates prior to October 1582 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ELNK-Trace: 13fa671f3967ab96548f0f3b3e7f2810239a348a220c2609cd9ca31c8b278747ac44ddf42dd7182e3ca473d225a0f487350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 24.40.130.18 X-Virus-Checked: Checked by ClamAV on apache.org Please REMOVE me from the Bugzilla mail list. I have returned to Open Office 3.3 & will wait until/when 3.4 is fixed properly! tcrook@realtor.com On 7/27/2012 9:53 AM, bugzilla@apache.org wrote: > https://issues.apache.org/ooo/show_bug.cgi?id=120390 > > Priority: P3 > Bug ID: 120390 > Assignee: ooo-issues@incubator.apache.org > Summary: Function MONTH gives wrong result for many dates prior > to October 1582 > Severity: normal > Issue Type: DEFECT > Classification: Application > OS: All > Reporter: jes@martnet.com > Hardware: All > Status: UNCONFIRMED > Version: AOO 3.4.0 > Component: ui > Product: spreadsheet > > Created attachment 78757 > --> https://issues.apache.org/ooo/attachment.cgi?id=78757&action=edit > Calc spreadsheet showing affected dates > > Ok, this is definitely obscure, but for the record ... > > The MONTH function in Calc returns incorrect results for many dates prior to > Oct 1582. > > For example, > > Enter this date: > A1: 1582-01-22 > > Check the month for the date: > B1: =MONTH(A1) > > Result: 2 (should be 1) > > Change A1 to 1582-01-21 > > Now MONTH in B1 returns the correct result, 1 > > The same function, in the number formatting code, gives the correct result (for > all dates that I've checked): > C1: =A1 > Format > Cells > Numbers > Format code: M (month number) > > Result: 1 (correct) > > This provides a simple workaround for finding the correct month: > =VALUE(TEXT(date;"M")) > > The attached sheet shows which dates are affected for any given year; only > dates prior to the calendar change (October 1582 in Calc) are affected. It > seems that perhaps the MONTH code does not account properly for the ten days > skipped in the Gregorian reform. > > Forum thread where the problem was first reported: > http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&t=55329 >