ODFF1.2 interpretation of function WEEKNUM
winfried.libreoffice at gmail.com
Mon Sep 18 15:20:33 UTC 2017
I'm working on tdf112320 and I think that ODFF1.2 may be ambiguous with
respect to WEEKNUM
My interpretation of the Semantics for Mode 1,2,11-17 was that
'every week starts on Sunday..Saturday, depending on the value of Mode.
The week containing 1 January is week 1'.
So, WEEKNUM(DATE(2014,12,29),1) returns 1, as it is a Monday, the week
starts on Sunday 28 December and 1 January is on the Thursday. All weeks
have 7 days.
However, both Excel and Gnumeric use
'every week starts on Sunday..Saturday, depending on the value of Mode,
_or_ on 1 January (with the week number 1)'.
So, WEEKNUM(DATE(2014,12,29),1) returns 53, as it is a Monday, following
week 52 and WEEKNUM(DATE(2015,1,1),1) returns 1. Week 53 has 4 days and
week 1 has 3 days.
When I read ODFF1.2 again (and again) I read the first interpretation
(WEEKNUM(DATE(2014,12,29),1)=1). But is that correct??
As it is now, Calc produces different results when compared to Excel and
What is your interpretation?
More information about the LibreOffice