After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698772 - argument order in DAYS function doesn't match OpenFormula specification
argument order in DAYS function doesn't match OpenFormula specification
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-04-24 17:20 UTC by Adam Dingle
Modified: 2013-04-25 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Dingle 2013-04-24 17:20:07 UTC
In Gnumeric the DAYS function takes arguments DAYS(start_date, end_date).  But in the OpenFormula specifcation the argument order is DAYS(end_date, start_date):

http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018182_715980110

And so DAYS in Gnumeric returns the negative of what it would in OpenFormula.
Comment 1 Morten Welinder 2013-04-24 17:34:44 UTC
http://office.microsoft.com/en-us/excel-help/days-function-HA102753275.aspx
says...

    DAYS(end_date, start_date)

so we're the odd guy in this mix.
Comment 2 Morten Welinder 2013-04-24 18:10:33 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 3 Morten Welinder 2013-04-25 11:32:40 UTC
Out of curiosity, how was this bug discovered?
Comment 4 Adam Dingle 2013-04-25 11:35:44 UTC
Good question!  :)  A colleague sent me a spreadsheet in ODS format - I think he generated it using LibreOffice Calc.  When I opened it in Gnumeric some values in it were nonsensical, and I tracked down the problem to a difference in how LibreOffice and Gnumeric handled the DAYS function.