https://bugs.documentfoundation.org/show_bug.cgi?id=171969
Bug ID: 171969
Summary: Wrong recount of number of days in function Datedif
with option "md" (macOS)
Product: LibreOffice
Version: unspecified
Hardware: All
OS: macOS (All)
Status: UNCONFIRMED
Severity: minor
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
DATEDIF("2020-01-31";"2020-03-02";"md") should be 2, not 0.
The elapsed time is 1 month and 2 days, not 1 month and 0 days.
The month has been completed on 2020-02-29, not in the (non-existent)
2020-02-31.
DATEDIF("2022-01-31";"2022-03-02";"md") should be 2, not -1.
The elapsed time is 1 month and 2 days, not 1 month and -1 days.
The month has been completed on 2022-02-28, not in the (non-existent)
2022-02-31.
The bug occurs when
the number of days in the month prior to the End Date
is less than
the number of days in the Start Date.
Steps to Reproduce:
1. Use Datedif with "md" option in libreoffice calc like in the examples.
2.
3.
Actual Results:
When the number of days in the month prior to the End Date
is less than the number of days in the Start Date,
the days count don't beguin with the end of the month prior to the End Date.
Expected Results:
When the number of days in the month prior to the End Date
is less than the number of days in the Start Date,
the number of months elapsed is completed at the end of the month prior to the
End Date
and then the day count should beguin.
Reproducible: Always
User Profile Reset: Yes
Additional Info:
I think i have seen this in Windows too.
It happens since, at least, Libreoffice 6.something.
--
You are receiving this mail because:
You are the assignee for the bug.