https://bugs.documentfoundation.org/show_bug.cgi?id=144239
Eike Rathke <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |NOTABUG --- Comment #3 from Eike Rathke <[email protected]> --- This is correct and not a bug. DAYS360() "Returns the difference between two dates based on the 360 day year", see https://help.libreoffice.org/latest/en-GB/text/scalc/01/func_days360.html and https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#DAYS360 for the algorithms. For the example in the report with US-NASD algorithm we have (2021*360=727560 + 8*30=240 + 31) = 727831 - (2021*360=727560 + 9*30=270 + 1) = 727831 = 0 (In reply to Michael Warner from comment #1) > This document shows DAYS360 returning the same value for both August 30 and > August 31. Yes, though that document tests a different, European, algorithm (3rd argument !=0, note also there's no difference between 1 or 2, it's a logical parameter, either 0 or not 0). Result is different in this case. For 2021-08-31 start date day is changed to 30. Then for both we have (2021*360=727560 + 9*30=270 + 1) = 727831 - (2021*360=727560 + 8*30=240 + 30) = 727830 = 1 Please also don't use text arguments for numeric parameters, result depends on settings (i.e. I get #VALUE! errors for all because I use the strictest setting). In this case use the DATE() function instead. Yes, the help is bad on that. -- You are receiving this mail because: You are the assignee for the bug.
