Hi Winfried, On Friday, 2012-06-01 10:07:00 +0200, Winfried Donkers wrote:
I would like to change the behaviour of function WEEKNUM to conform to ODFF1.2 (core/tools/source/datetime/tdate.cxx, Date::GetWeekOfYear(..) allows this), but before enter a bug and start working on it, I would like to hear if there are reasons to keep WEEKNUM as it is (and change the documentation to state that the function differs from ODFF1.2).
The reason would be exsiting documents that already use a Mode value !=1 and assume that Monday would be used. I think some may pass 0 instead of 2 as argument for this case, as the result of a boolean evaluation. We might get away with strictly complying with ODFF and generate an error for constraint cases if prominently mentioned in release notes that WEEKNUM changed. Users will have to change formulas then and we get angry mails and bug reports ;-) The other possibility would be to introduce an additional ISOWEEKNUM function and map the existing WEEKNUM to ISOWEEKNUM upon reading if and only if the Mode argument is literal and matches the constraints. Writing WEEKNUM then would have to be done as ORG.LIBREOFFICE.WEEKNUM, that couldn't be read by older versions so before actually writing that name at least 2 minor releases must be able to read it already. And of course other ODF consumers would not be able to read it. So quite more complicated than the first solution and introducing interoperability problems. Therefor I'd go with strict ODFF implementation. Eike -- LibreOffice Calc developer. Number formatter stricken i18n transpositionizer. GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
Attachment:
pgptUQKzXBkWs.pgp
Description: PGP signature