Bug 44456 - Missing OpenFormula function Datedif
Summary: Missing OpenFormula function Datedif
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: Other All
: high enhancement
Assignee: Eike Rathke
URL:
Whiteboard: target:3.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-04 11:12 UTC by Sameer Bahadur
Modified: 2014-04-15 23:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
patch sofar, not yet ready for submitting (13.77 KB, application/octet-stream)
2012-05-08 03:32 UTC, Winfried Donkers
Details
test case document ODF .ods (14.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-05-14 04:36 UTC, Eike Rathke
Details
same test case saved as .xls (20.50 KB, application/vnd.ms-excel)
2012-05-14 04:37 UTC, Eike Rathke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sameer Bahadur 2012-01-04 11:12:32 UTC
Datediff() function is not provided; Yearfrac() function is provided instead.
This causes lot of portability problems.

Kspread does not provide yearfrac(), but supports datediff(); 

MS Office also supports function datediff().
Comment 1 Markus Mohrhard 2012-01-07 17:48:07 UTC
Yearfrac is a OpenFormula/ODF function and needs to be implemented if we want to follow the standard.

The bug here is the missing Datedif function from Openformula: http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01-part2.html#__RefHeading__1018176_715980110
Comment 2 Winfried Donkers 2012-04-23 04:36:48 UTC
I'll start working on it; I would like to have the datedif function myself too...
Comment 3 Winfried Donkers 2012-05-08 03:32:44 UTC
Created attachment 61212 [details]
patch sofar, not yet ready for submitting
Comment 4 Not Assigned 2012-05-13 04:53:05 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4e71be498903dee5bf719a73f4976bb5356335dd

fdo#44456 added calc function DATEDIF as in ODF1.2
Comment 5 Not Assigned 2012-05-13 04:53:31 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=40c8170c5281cd7b19313a79f902ef9715351c9f

changes to patch fdo#44456 added calc function DATEDIF
Comment 6 Eike Rathke 2012-05-13 05:31:40 UTC
This is not finished yet and needs some further love.
Comment 7 Eike Rathke 2012-05-14 04:36:41 UTC
Created attachment 61607 [details]
test case document ODF .ods

Note difference in H17, hence H37 is red FALSE. I believe this is an error of Excel.
Comment 8 Eike Rathke 2012-05-14 04:37:23 UTC
Created attachment 61608 [details]
same test case saved as .xls
Comment 9 Not Assigned 2012-05-14 04:44:44 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=121a39be3019baa840bb595acf0e648245a01b04

further changes to patch fdo#44456 added calc function DATEDIF
Comment 10 Not Assigned 2012-05-14 04:45:13 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=eb1770f05fde3777af7a62ec1c84ce8b088e3ec4

further changes to patch fdo#44456 added calc function DATEDIF
Comment 11 Not Assigned 2012-05-21 06:51:54 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=485792374600cd9919ab6edf201e8bd97d640261

added unit tests for DATEDIF fdo#44456
Comment 12 Wade Colson 2014-04-15 23:01:07 UTC Comment hidden (spam)