Description: Sunday is considered "first day of the week" by LibreOffice (with Saturday as day 7), regardless of Locale settings or international standard. I.e. LO have defined week to be [Sunday --> Saturday], instead of [Monday --> Sunday] My Locale (Norwegian, Norway) have Monday (1) as first day of the week, and Sunday as last (7), in accordance with international standard (specifically ISO 8601). When I use either 'weeknum()' or 'weekday()' on a Sunday, it will be displayed/defined as the same weeknumber as the following monday, and weekday=1, repectively. This also applies when I use conditinoal formatting to highlight dates: [Date is --> This week --> Apply XYZ formatting]. This is demonstrated in the attached screenshot. Steps to Reproduce: 1. Add a date to cell (sunday): A1 =11.06.2017 2. Cell B1 =weekday(A1) --> output: 1 3. Same for Saturday, but output as day 7 Actual Results: Sunday is output as First Day of the Week (1). Saturday is output as Last Day of the Week (7). Expected Results: Monday should be considered First Day of the Week (1). Sunday should be considered Last Day of the Week (7). Reproducible: Always User Profile Reset: No Additional Info: I've tried changing Locale settings around, but nothing works. I've tested/checked this bug to be true for maxOS, Linux, and Windows. User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0
Created attachment 134008 [details] sun-sat week. NOR locale. A quick example to show the output of formulae and highlighting. Weekdays in Norwegian. Sunday (søndag) through Saturday (lørdag), descending order in the highlighted area.
I can produce another behavior step 2 the second type parameter is missing; weekday(day;type), so it will use the default Sunday I have two different type needed for the correct day number and week number
Created attachment 134012 [details] local setting for weekday and weeknumber
Hi, See here for further explanations: https://help.libreoffice.org/Calc/WEEKDAY Thank you, Jacques
(In reply to Jacques Guilleron from comment #4) > Hi, > See here for further explanations: > https://help.libreoffice.org/Calc/WEEKDAY > Thank you, > > Jacques Yes, that works for specifically 'weekday()' and 'weeknum()', but it does not solve the problem of highlighting [Date is --> This week], as on a *date* basis it is still a sun-sat week. I have need of the entire date system being in type 2. And from a usability/UX standpoint, this ought follow locale settings regardless, as this workaround isn't a solution that is readily apparant to most people. Especially if they come from another office suite, where this function automatically follows locale or other settings in the settings menus.