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: [email protected]
Reporter: [email protected]
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._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs