tdf#50950 sort out Calc (ISO)WEEKNUM functions

Eike Rathke erack at redhat.com
Thu Mar 5 12:29:57 PST 2015


Hi Winfried,

On Wednesday, 2015-03-04 11:36:49 +0100, Winfried Donkers wrote:

> I checked the function definitions for WEEKNUM and ISOWEEKNUM, for ODFF and Excel. ODFF and Excel are as good as identical, except that Excel may experience problems when the date value is entered is text.

Not only Excel, converting text to numbers during calculation is always
prone to errors. That's why we have
ScInterpreter::ConvertStringToValue() with its more and less restrictive
option settings.

> I intend to ignore that difference and support both WEEKNUM and ISOWEEKNUM in Calc.
> As you know, the problem is that the ODFF function name ISOWEEKNUM is currently used for a function with WEEKNUM functionality.

Yes. And additionally troublesome is that WEEKNUM_ADD is an Add-In
function and WEEKNUM is not.

> I propose to put right in 2 steps:
> LO version 4.5:
> UI		ODFF			ODFF-'legacy'		Excel
> WEEKNUM	WEEKNUM		ISOWEEKNUM			WEEKNUM
> ISOWEEKNUM	ISOWEEKNUM_TMP					ISOWEEKNUM

I don't get the ISOWEEKNUM_TMP, what is it supposed to serve?

> and remove UI WEEKNUM_ADD

We will need that somehow for old Excel file formats where all Add-In
functions are stored explicitly as Add-In names which we "automatically"
map to/from our Add-In (which first hand was the reason to implement
those functions as Add-In). Also note that in the old PODF/OOo format
the programmatical Add-In name was stored. Changing that would open
a can of worms. So, completely removing it is not an option, at best
rename it and/or hide it in the FunctionWizard.


> LO version 4.6:
> UI		ODFF			ODFF-'legacy'		Excel
> WEEKNUM	WEEKNUM		WEEKNUM			WEEKNUM
> ISOWEEKNUM	ISOWEEKNUM		ISOWEEKNUM_TMP		ISOWEEKNUM

Again, I don't get what the ISOWEEKNUM_TMP serves for, could you
elaborate?

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150305/b384cd41/attachment.sig>


More information about the LibreOffice mailing list