When I put in a negative string ("-3,5") in Floats :: fromString I get the correct float value (-3.5).
When I put in a negative string time ("-3:30") in Floats :: fromString I get a wrong float value (-2.5).
I think the calculation he is doing is the following:
-3:30 > -3 Hour and 30 Minute
-3 + 30
is 2,5 Hour
I think you have to subtract the minutes instead of adding.
Hello, I have a problem.
When I put in a negative string ("-3,5") in Floats :: fromString I get the correct float value (-3.5). When I put in a negative string time ("-3:30") in Floats :: fromString I get a wrong float value (-2.5).
I think the calculation he is doing is the following: -3:30 > -3 Hour and 30 Minute -3 + 30 is 2,5 Hour
I think you have to subtract the minutes instead of adding.
https://github.com/h4kuna/data-type/blob/master/src/Basic/Floats.php#L54