Wrong output on certain time values
Hello dear dev,
Description
We use Hyperformula to calculate elapsed time between two input values. The input are string formatted as : "hh:mm".
Used formula "=TEXT(B1-A1, "hh:mm")" Example : A = "13:25" B = "18:40" Expected result = "05:15"
PROBLEM : when the result is > 1h, if ending with 17 min, the output value is "..:16" instead of "..:17" A = " 14:00" B = "15:17" result should be "01:17" But actual output is "01:16". There must be a rounding issue.
Steps to reproduce
Try this codeSandbox demo when result should end with '...:17'
Demo
https://codesandbox.io/s/frosty-fire-7s49r3?file=/src/App.js
Your environment
- HyperFormula version: "hyperformula": "^1.0.0",
- Browser Name and version: Firefox v103.0 and Chrome Version 103.0.5060.134,
- Operating System: MacOs (arm64)
Links none
Hi @Kibarol, thank you for reporting. It seems to be a bug. Our team will investigate it shortly.
Note to self: It seems that HyperFormula lacks unit tests for the time arithmetics. It must be fixed when working on this issue,
Hi, any news concerning this issue?
@Kibarol This bug is in the scope of the upcoming release that is expected within a couple of weeks.
Hi @Kibarol
I'm more than happy to announce that @sequba just launched HyperFormula 2.1.0 where this issue is fixed. We are closing this issue as solved. If there is anything that won't work for you after updating please leave a comment.