[Libreoffice-bugs] [Bug 127476] Rounding behaviour of YEAR and SECOND function is inconsistent
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue May 26 16:19:51 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=127476
Eike Rathke <erack at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED
--- Comment #9 from Eike Rathke <erack at redhat.com> ---
Only SECOND() is specified to round, MINUTE() and HOUR() are specified to not
round. Yes rounding SECOND() is odd, complains go to Excel.
Specifically you do not want to see 2000-01-01T00:00:00 if the value actually
is 1999-12-31T23:59:59.9 ... and yes, obtaining 1999-12-31T23:59:00 for
individual HOUR():MINUTE():SECOND() functions is not much better, not rounding
at all would be expected, but again, complain with Excel.
References:
https://docs.oasis-open.org/office/OpenDocument/v1.3/cs01/part4-formula/OpenDocument-v1.3-cs01-part4-formula.html#HOUR
https://docs.oasis-open.org/office/OpenDocument/v1.3/cs01/part4-formula/OpenDocument-v1.3-cs01-part4-formula.html#MINUTE
https://docs.oasis-open.org/office/OpenDocument/v1.3/cs01/part4-formula/OpenDocument-v1.3-cs01-part4-formula.html#SECOND
Btw, calculating with strings is luck and depends on the locale if it contains
separators. If at all then use a date+time string in real ISO 8601 format which
recognizes both
1999-12-31T23:59:59.9
1999-12-31T23:59:59,9
Closing as WontFix.
--
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/20200526/a631aebd/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list