[Libreoffice-bugs] [Bug 127477] New: Incomplete description of date & time functions in the help information
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 10 14:37:07 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=127477
Bug ID: 127477
Summary: Incomplete description of date & time functions in the
help information
Product: LibreOffice
Version: 6.0.4.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Documentation
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: albrecht.mueller at astrail.de
CC: olivier.hallot at libreoffice.org
Description: A well established de-facto standard seems to exist which
specifies how spreadsheet application do date & time calculations. This
standard seems to be more than 20 years old. It seems to include the convention
to round floating point arguments to the nearest second before extracting date
or time related information such as year, month, day, hour etc. This usually
avoids the need to care about round-off errors or to distinguish between points
in time and durations. The help information does not mention this convention
which may be the source of a serious regression error (bug 127334) and
inconsistent behaviour (bug 127476) and various other bugs: I discovered Bug
18800, and Bug 121978 (this one contains links to additional problems in the
„see also“ part) and bug 122158. The key problem: Not knowing what the intended
behaviour is makes it impossible to distinguish between bugs and correct
behaviour. So you cannot fix related bugs.
How to reproduce: Look up the description of the functions like YEAR
(https://help.libreoffice.org/6.3/en-US/text/scalc/01/func_year.html), MONTH,
DAY, HOUR, MINUTE and SECOND
(https://help.libreoffice.org/6.3/en-US/text/scalc/01/func_second.html). The
section „Date & Time Function“
(https://help.libreoffice.org/6.3/en-US/text/scalc/01/04060102.html ) contains
a list with links to those functions. There may be some more functions not
mentioned here that are affected by this problem.
Actual behaviour: You will see statements like „Returns the year as a number
according to the internal calculation rules.“ or „Returns the second for the
given time value. The second is given as an integer between 0 and 59.“ The
descriptions says nothing about the way rounding is is intended to be done
which is important as the arguments of these functions are float values which
may contain round-off errors. So the description leaves open what
YEAR("1999-12-31 23:25:59,6") should return. If you round to the next second
the result should be 2000. If you use some kind of wall clock rounding you get
1999 and are in the previous millennium. Of course the results of various
applications differ: More than 20 year old MS Excel97 returns 2000 while
LibreOffice returns 1999 (observed with versions VS. 6.2.6.2 and 6.0.4.2)
Expected behaviour: The help information should clearly and completely describe
the intended semantics of these functions. Preferably this description is
consistent with itself and with the de-facto standard. If the help function
refers to „results based on international standards“ it should name these
standards and give at least some hints where to find them.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190910/7dfa15ee/attachment.html>
More information about the Libreoffice-bugs
mailing list