Description: If I don't significantly misread all documentation I could find, WEEKNUM does not work as documented for the year 2021: https://help.libreoffice.org/7.0/en-US/text/scalc/01/func_weeknum.html?&DbPAR=WRITER&System=UNIX System 2 > The week containing the first Thursday of the year is the first week of the > year, and is numbered week 1. That means that week number 1 of any year is > the week that contains January 4th. ISO 8601 defines this system and that the > week starts on Monday. However: 01.01.21 1 =KALENDERWOCHE(A1;2) 02.01.21 1 =KALENDERWOCHE(A2;2) 03.01.21 1 =KALENDERWOCHE(A3;2) 04.01.21 2 =KALENDERWOCHE(A4;2) 05.01.21 2 =KALENDERWOCHE(A5;2) 06.01.21 2 =KALENDERWOCHE(A6;2) 07.01.21 2 =KALENDERWOCHE(A7;2) Steps to Reproduce: 1. Use the example data pasted to the description field Actual Results: The week containing the 4th of January is counted as "week 2". Expected Results: The week containing the 4th of January should be counted as "week 1". That's what the documentation states, and also what my calendar says... Reproducible: Always User Profile Reset: No Additional Info: Reproducable in both * 7.0.4.2 Linux 64 Bit desktop binary * and LibreOffice 6.4 (Collabora CODE).
Documentation https://help.libreoffice.org/7.0/en-US/text/scalc/01/func_weeknum.html?&DbPAR=WRITER&System=UNIX states: System 2 > The week containing the first Thursday of the year is the first week of the year, > and is numbered week 1. That means that week number 1 of any year is the week > that contains January 4th. ISO 8601 defines this system and that the week starts on Monday. And the table below shows the following modes for System 2 > System 2 21 Monday (ISO 8601) > 150 (ISO 8601, for interoperability with Gnumeric) Hence you need Mode=21 (not Mode 2, which is a mode of System 1) and you'll get: Date DD.MM.YYYY) Weeknum Formula 01.01.2021 53 =WEEKNUM(A2;21) 02.01.2021 53 =WEEKNUM(A3;21) 03.01.2021 53 =WEEKNUM(A4;21) 04.01.2021 1 =WEEKNUM(A5;21) 05.01.2021 1 =WEEKNUM(A6;21) 06.01.2021 1 =WEEKNUM(A7;21) 07.01.2021 1 =WEEKNUM(A8;21) From my point of view: Not a bug
Whoops, ok, PEBKAC, sorry. :-( http://ars.userfriendly.org/cartoons/?id=19980506