RE: [PUSHED][PATCH] fdo#44456 added calc function DATEDIF as in ODF 1.2

2012-05-16 Thread Winfried Donkers
Hi Regina,

>Van: Regina Henschel [rb.hensc...@t-online.de]
>Verzonden: dinsdag 15 mei 2012 19:55
>The page
>http://wiki.services.openoffice.org/wiki/Calc/ODFF_Implementation/Examine_functions
>lists some missing functions in the lower part. And perhaps you add
>yourself to DATEDIF with comment "fdo#44456" :)

Ehh.. I'm not familiar with adding content to (wiki/web) pages. And anyway, 
Eike deserves at least as much credit for this patch.
I don't see any LibreOffice comments, would this (DATEDIF) be the first one?
Also, coukld this page be a source for me to add more formulas that are in 
ODF1.2 and not yet in calc?

Winfried
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED][PATCH] fdo#44456 added calc function DATEDIF as in ODF 1.2

2012-05-15 Thread Regina Henschel

Hi Winfried,

Winfried Donkers schrieb:

Hi Eike,



Great! I'm looking forward. Do you have already an idea what you'll pick

next?

I did do a prelimary search of formula-related bugs, but didn't have time yet 
to look more closely at them.
I prefer the formula coding/behaviour itself more than UI. Perhaps you have 
suggestions, or wishes?
You have a better notion of priorities, I guess...


The page 
http://wiki.services.openoffice.org/wiki/Calc/ODFF_Implementation/Examine_functions 
lists some missing functions in the lower part. And perhaps you add 
yourself to DATEDIF with comment "fdo#44456" :)


Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


RE: [PUSHED][PATCH] fdo#44456 added calc function DATEDIF as in ODF 1.2

2012-05-15 Thread Winfried Donkers
Hi Eike,

>Heh, sorry for having taken away the work from you :-)
>I'll keep that in mind for next time.

 :)

>I thought I'd get that algorithm solved because I quite know the date
>calculation area and the quirks that may be lurking there.

Your quite right, of course.

>Usually for spreadsheet functions we strive for Excel interoperability.
>(Actually they implemented this function because Lotus 1-2-3 had it the
>same way, anyway...)  If we allowed reversed date arguments, importing
>a document in Excel would give different results, errors in this case.
>The ODFF definition lacks a constraint that date1 must be <= date2,
>seems we didn't think of that back then, I'll submit a comment. Also
>Gnumeric implemented it the same.

My experience with datedif(f) is more with SQL and the like, but your reasoning 
is very sound.

>I'd rather stick with the current implementation for the above reasons.

Quite right, again :)

>> And a big thank you for all your corrections/inprovements!
>> I hope to be able to send in more formula based patches, I like this area:)
>Great! I'm looking forward. Do you have already an idea what you'll pick
next?

I did do a prelimary search of formula-related bugs, but didn't have time yet 
to look more closely at them.
I prefer the formula coding/behaviour itself more than UI. Perhaps you have 
suggestions, or wishes?
You have a better notion of priorities, I guess...
I must say, that I will be absent for some days, so don't be alarmed when you 
don't get a respons from me right away.

Winfried
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED][PATCH] fdo#44456 added calc function DATEDIF as in ODF 1.2

2012-05-15 Thread Eike Rathke
Hi Winfried,

On Tuesday, 2012-05-15 08:09:37 +0200, Winfried Donkers wrote:

> You did a lot of work! I expected some or a lot of comments on my 
> interpretations
> of ODF1.2 as i don't have Excel to compare with, but you did all the work 
> yourself!
>  I'm a volunteer, I don't mind cleaning up (my own) mess :)

Heh, sorry for having taken away the work from you :-)
I'll keep that in mind for next time.

I thought I'd get that algorithm solved because I quite know the date
calculation area and the quirks that may be lurking there.


> > Some detailed nitpicks in commit comments :-)
> 
> If I'm correct, the main changes are that  my interpretation of ignore 
> years/months were not right.

Hm, yes. I wouldn't say it's your fault though, the ODFF definition is
a bit weak to implement that from scratch if one is not familiar with
the area.

> There is one thing I am not very happy about: DATEDIF in calc now does
> not accept date1 to be later (larger) than date2. IMHO this should be
> possible as it is a very normal possibilty. It looks as if DATEDIF
> does not accept this condition because Excel doesn't/can't. I thought
> calc conforms to ODF and can export to xls(x) but with possible loss
> of functionality. Now it is like LibreOffice is an open source copy of
> MS Office.

Usually for spreadsheet functions we strive for Excel interoperability.
(Actually they implemented this function because Lotus 1-2-3 had it the
same way, anyway...)  If we allowed reversed date arguments, importing
a document in Excel would give different results, errors in this case.
The ODFF definition lacks a constraint that date1 must be <= date2,
seems we didn't think of that back then, I'll submit a comment. Also
Gnumeric implemented it the same.

> I would very much like to adjust the code to make it possible again
> for date1 to be later (larger) than date2, both to increase its use :)
> and because I don't want to be a follower of MS Office :(

I'd rather stick with the current implementation for the above reasons.

> And a big thank you for all your corrections/inprovements!
> I hope to be able to send in more formula based patches, I like this area:)

Great! I'm looking forward. Do you have already an idea what you'll pick
next?

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpJsKpn9oXVd.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


RE: [PUSHED][PATCH] fdo#44456 added calc function DATEDIF as in ODF 1.2

2012-05-14 Thread Winfried Donkers
Hi Eike,

> This took a little longer than I expected as I had to figure out what Excel
> actually does in DATEDIF. Please see
> https://bugs.freedesktop.org/show_bug.cgi?id=44456
> for changes I did and test case document. For the final algorithm of the
> function itself best take a look at the current interpr2.cxx as I spoiled it 
> in
> between myself ...

You did a lot of work! I expected some or a lot of comments on my 
interpretations
of ODF1.2 as i don't have Excel to compare with, but you did all the work 
yourself!
 I'm a volunteer, I don't mind cleaning up (my own) mess :)

> Some detailed nitpicks in commit comments :-)

If I'm correct, the main changes are that  my interpretation of ignore 
years/months were not right.
There is one thing I am not very happy about: DATEDIF in calc now does not 
accept date1 to be later (larger) than date2. IMHO this should be possible as 
it is a very normal possibilty. It looks as if DATEDIF does not accept this 
condition because Excel doesn't/can't. I thought calc conforms to ODF and can 
export to xls(x) but with possible loss of functionality. Now it is like 
LibreOffice is an open source copy of MS Office.
I would very much like to adjust the code to make it possible again for date1 
to be later (larger) than date2, both to increase its use :) and because I 
don't want to be a follower of MS Office :(

> Thanks for getting this going!

And a big thank you for all your corrections/inprovements!
I hope to be able to send in more formula based patches, I like this area:)

Winfried
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED][PATCH] fdo#44456 added calc function DATEDIF as in ODF 1.2

2012-05-14 Thread Eike Rathke
Hi Winfried,

On Wednesday, 2012-05-09 16:49:41 +0200, Winfried Donkers wrote:

> Attached patch adds function DATEDIF to calc as defined in ODF1.2 (6.10.3)

This took a little longer than I expected as I had to figure out what
Excel actually does in DATEDIF. Please see
https://bugs.freedesktop.org/show_bug.cgi?id=44456
for changes I did and test case document. For the final algorithm of the
function itself best take a look at the current interpr2.cxx as
I spoiled it in between myself ...

Some detailed nitpicks in commit comments :-)

Thanks for getting this going!

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpTuLFEKHdzo.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice