WeekDay BASIC function documentation [1] only lists one argument. In fact, it takes second optional argument [2], which is consistent with documentation available for corresponding VBA function [3]. The task is to provide the missing documentation in [1]. [1] https://help.libreoffice.org/6.4/en-US/text/sbasic/shared/03030105.html [2] https://opengrok.libreoffice.org/xref/core/basic/source/runtime/methods1.cxx?r=62f3f3d9#1751 [3] https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/weekday-function
FTR: the optional second argument was implemented at the same time as the function itself - in 2004: https://gerrit.libreoffice.org/plugins/gitiles/core/+/3aa55b592d25bf8b0bc0323dfbd5c905fd2f0e91.
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/f9a2226309678e6a8769af6d312f796bb6835c4b tdf#131368, tdf#141474 Document WeekDay Basic function