Created attachment 126844 [details] Workday.Intl example Dear LibreOffice Support Team, this is to inform you about a miscalculation of WORKDAY.INTL function because it returns an holiday date although a valid holidays range has been set. To ensure about this unexpected behaviour, WORKDAY and WORKDAY.INTL functions has been compared 1) using same default weekend and holidays range: 2) calculating the same next workday 3) also on Google Drive WORKDAY(<my date>,1,<my holidays range>) WORKDAY.INTL(<my date>,1,1,<my holidays range>) Thank you and best regards
Thank you for the bug report. Reproduced with v5.2.0.4 and v4.0.0.3 (the function was introduced there).
*** Bug 101833 has been marked as a duplicate of this bug. ***
Setting easyHack tag, it's a simple fix. The problem is if the period ends with a holiday right after weekend, it's disregarded. Pointer: https://cgit.freedesktop.org/libreoffice/core/commit/?id=22dac22fe256b28b78c8e0783f2625aee0f75ace Function: void ScInterpreter::ScWorkday_MS() http://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr2.cxx Adding raal, please update the test once it's fixed.
(In reply to Aron Budea from comment #3) > Setting easyHack tag, it's a simple fix. > The problem is if the period ends with a holiday right after weekend, it's > disregarded. > I'll fix it (as I didn't appear to implement it correctly in the first place).
Created attachment 127207 [details] WORKDAY, WORKDAY.INTL example Added the results from Excel for these function, showing that there are 4 different results instead of 2.
Comment on attachment 126844 [details] Workday.Intl example replaced by attachment 127207 [details]
This bug does not qualify as a easyHack, there are no code pointers and the keywords to not follow the standard. Remark, easyHack keyword normally requires a core developer Or QA/UI team member have looked at the bug and made sure it is easy to solve.
Created attachment 127220 [details] test document with comparison with Excel results Document contains framework for tests with different days values, both negative and positive. Tested document in Excel for some values of days; WORKDAY and WORKDAY.INTL produced the same results.
(In reply to jan iversen from comment #7) > This bug does not qualify as a easyHack, there are no code pointers and the > keywords to not follow the standard. > > Remark, easyHack keyword normally requires a core developer Or QA/UI team > member have looked at the bug and made sure it is easy to solve. Jan, the code pointer was in comment 3, not sure what you meant by keywords, and I'm in the QA team. I also think this was a pretty easy task (producing an extensive test document isn't, though), but Winfried wanted to take care of it, and is processing it himself, and that's cool, too. Thanks for picking it up, Winfried!
Hi Winfried, Please, next time you assign a bug to yourself, remember to change the status and the assignee. Regards
(In reply to Xisco Faulí from comment #10) > Hi Winfried, > Please, next time you assign a bug to yourself, remember to change the > status and the assignee. > Regards Hi Xisco, Thank you for correcting, I will try to remember next time ;-)
Winfried Donkers committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5e9d5eeb8a33fdcc500377d9eace40b5f5a7f750 tdf#101541 function WORKDAY.INTL not working properly It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
@Raal: Can you please add the test cases from the attachment and maybe those of bug 101833 as well to sc/qa/unit/data/functions/fods/workday.intl.fods Thanks.
Winfried Donkers committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=13ba2592254c861dafa337121902168d83f610bd&h=libreoffice-5-2 tdf#101541 function WORKDAY.INTL not working properly It will be available in 5.2.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Winfried Donkers committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3bf31803959ccc54bb949630f936a768ef47a90b&h=libreoffice-5-1 tdf#101541 function WORKDAY.INTL not working properly It will be available in 5.1.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.