Bug 157974

Summary: EDITING: DAY() Function one too many before 1900
Product: LibreOffice Reporter: Alex G <alex>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: ARM   
OS: macOS (All)   
Whiteboard:
Crash report or crash signature: Regression By:

Description Alex G 2023-10-29 20:33:44 UTC
Regression. Confirmed again in Mac Version 7.5.

=DAY(1590-01-06 05:22:00)
expected: 6
actual: 7

=DAY(1990-01-06 05:22:00)
expected: 6
actual: 6

Similar to regression: https://bugs.documentfoundation.org/show_bug.cgi?id=157786
except that
=YEAR() and =MONTH() appear to work correctly but =DAY() adds an extra day in years before 1900.
Comment 1 Mike Kaganski 2023-10-30 03:58:36 UTC

*** This bug has been marked as a duplicate of bug 157786 ***
Comment 2 Mike Kaganski 2023-10-30 06:09:57 UTC
(In reply to Alex G from comment #0)
> Regression. Confirmed again in Mac Version 7.5.
> ...
> Similar to regression:
> https://bugs.documentfoundation.org/show_bug.cgi?id=157786
> except that
> =YEAR() and =MONTH() appear to work correctly but =DAY() adds an extra day
> in years before 1900.

1. Note that bug 157786 was only fixed in 7.6.3; so it is indeed expected that you see it in 7.5.
2. Note bug 157786 comment 4. It worked incorrectly also for MONTH and YEAR.