[Libreoffice-bugs] [Bug 122158] New: DAY(), MONTH() and YEAR() functions don't handle Gregorian cut-over

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Dec 17 16:56:42 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=122158

            Bug ID: 122158
           Summary: DAY(), MONTH() and YEAR() functions don't handle
                    Gregorian cut-over
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: erack at redhat.com

In A1 enter date 1582-10-16
In A2 enter date 1582-10-15
Select A1:A2 and pull down a few cells, resulting dates are 1582-10-04,
1582-10-03, ..., correct due to the Gregorian calendar cut-over.
In B2 enter =DAY(A2) => 15
In B3 enter =DAY(A2) => 14  (wrong)
Similar for a date of 1582-09-30 the MONTH() function calculates 10 instead of
9.
For a date of 1581-12-31 the YEAR() function calculates 1582 instead of 1581.

The DAY(), MONTH() and YEAR() functions do not take the 10 days gap at the
Gregorian calendar's cut-over date into account. The date serial numbers and
number formatter display values are correct, hence subtracting 1582-10-04 from
1582-10-15 (i.e. =A2-A3) is indeed one day, and adding one day to 1582-10-04
(i.e. =A3+1) results in 1582-10-15.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181217/5519bd4d/attachment-0001.html>


More information about the Libreoffice-bugs mailing list