incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry Crook <terrycr...@earthlink.net>
Subject Re: [Bug 120390] New: Function MONTH gives wrong result for many dates prior to October 1582
Date Fri, 27 Jul 2012 15:40:33 GMT
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
>


Mime
View raw message