https://bugs.documentfoundation.org/show_bug.cgi?id=123212

Winfried Donkers <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTABUG
             Status|NEW                         |RESOLVED

--- Comment #4 from Winfried Donkers <[email protected]> ---
The standard used (Open Document Format, Part 2 OpenFormula, version 1.2)
states that the value for MINUTE is not rounded:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018194_715980110
That means that the value for MINUTE can be 0..59, but never 60. The result for
HOUR isn't rounded either, whereas the result for SECOND is rounded.

The help text as referred to in comment #3 says the same.

The behaviour as stated in the standard and help text are correct for time
values, but can be unexpected for duration values. 
Calc cannot differentiate between time and duration. Both are floating point
values and the presentation of the value can be set by the user. There are some
inconsistencies in time presentation, and
http://bugs.documentfoundation.org/attachment.cgi?id=147433 demonstrates them.
And although it would be possible to differentiate between time and duration in
cell formatting, this is not possible with the functions HOUR, MINUTE, SECOND.
These functions are intended to show (date)time parts, not duration. Otherwise
MINUTE would return 120 when the duration was 2 hours.

If you want rounded values for duration, you will have to enter (B1-A1)*24*60
(cells in attachment #148966) and use cell format to set the number of decimals
you want to see.
The duration between A1 and B1 is not exactly 1 hour because of decimal to
binary conversion inaccuracy. This cannot be avoided as a decimal floating
point value can not always be represented _exactly_ in binary format.

I quite understand the seemingly incorrect answer as a duration is meant and
not a time value. Nonetheless I mark the bug report as NOTABUG.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to