User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 Build Identifier: LibreOffice 5.1.2.2 LibreOffice versjon 5.1.2.2. Norwegian version. Function UKENR(01.01.1995;1) is expected to be different than UKENR(01.01.1995;2), but provides the same output. I have not tried the English version but it is the WEEKNUM function. Reproducible: Always Steps to Reproduce: 1. Install Norwegian version of LO 5.1.2.2 2. Enter =UKENR(01.01.1995;2). 3. Compare with =UKENR(01.01.1995;1) Actual Results: Both provide week 1 as output Expected Results: =UKENR(01.01.1995;2) should output week no 52 =UKENR(01.01.1995;1) sould output week 1 [Information automatically included from LibreOffice] Locale: nb Module: SpreadsheetDocument [Information guessed from browser] OS: Linux (All) OS is 64bit: yes Reset User Profile?No
I suppose you have used =UKENR("01.01.1995";2) instead of =UKENR(01.01.1995;2)? For me this is reproducible with LO 5.1.3.2, (Win 8.1). I also receive only 1. This is differently than expected (see https://help.libreoffice.org/Calc/WEEKNUM).
Sorry for the delay. Yes, I used =UKENR("01.01.1995";2) instead of =UKENR(01.01.1995;2).
I didn't try in Norwegian, only in English, but I can confirm the behavior. However, I think that the behavior is correct and that there is a mistake in the documentation. At https://help.libreoffice.org/Calc/WEEKNUM it says: System 1: The week containing January 1 is the first week of the year, and is numbered week 1. In other words, if the mode argument is either absent, 1, 2, 11, 12, 13, 14, 15, 16 or 17, for January 1st of _any_ year the return value must be 1. However, this directly contradicts the example further down on the same page: =WEEKNUM(DATE(1995;1;1);2) returns 52. If the week starts on Monday, Sunday belongs to the last week of the previous year. This is wrong, I think. January 1st 1995 was a Sunday, but that doesn't even matter under system 1, where the outcome should be 1 regardless of which day the week starts on. (The Norwegian version of that page, https://help.libreoffice.org/Calc/WEEKNUM/nb, contains essentially the same text.)
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
I can confirm that the mistake is in the documentation, and that it has not been corrected. Alex got it right. It is just the example in the documentation that is incorrect. The documentation explains correctly, except for the example. However, if possible, a reference to the ISOWEEKNUM function should be included. This gives the output that European users, and users from many other countries, want without setting mode argument.
Olivier: it seems there's indeed a pb in the doc. The end of the page https://help.libreoffice.org/7.0/en-US/text/scalc/01/func_weeknum.html?DbPAR=CALC#bm_id3159161 indicates this: =WEEKNUM(DATE(1995;1;1);1) returns 1 (OK) =WEEKNUM(DATE(1995;1;1);2) returns 52. If the week starts on Monday, Sunday belongs to the last week of the previous year. (Wrong) it returns 1
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/1cb52499d411fbef66b0b0fa50096f9896938acc tdf#100070 - Corrected example for WEEKNUM using System 1