https://bugs.documentfoundation.org/show_bug.cgi?id=145578
Mike Kaganski <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |difficultyBeginner, | |easyHack, skillCpp --- Comment #2 from Mike Kaganski <[email protected]> --- (In reply to Yuri Pieters from comment #0) > Additional Info: > The operation of the function is described in the source file, which I read > at this link: > https://github.com/LibreOffice/core/blob/ > 14cfff500e93f0d6cbf8412065feea85c01ea81d/scaddins/source/datefunc/datefunc. > cxx#L442 You are completely correct, and the problem is using integral division by 7 there, which gives 0 for both first week of the year of nStartDate, as well as for the week before it. std::floor should be used instead. The easy hack should include a unit test. -- You are receiving this mail because: You are the assignee for the bug.
