issues
search
osuosl
/
fenestra
A dashboard displaying stats about the OSU Open Source Lab
Apache License 2.0
2
stars
3
forks
source link
Round hours in TimeSync widget to nearest.
#53
Closed
MorganEPatch
closed
7 years ago
MorganEPatch
commented
7 years ago
Fixes #52.
Changes in this PR.
[X] Use floating-point division to remove round-down errors from hour calculations
[X] Perform round-to-nearest rounding at the end of calculations for minimal error
Testing this PR.
Run fenestra with a small interval in the timesync widget for testing.
Enter a time into the timesync server with a duration like "3h45m", greater than half an hour.
Then add another time, with a duration of "1h30m".
Expected Output.
The widget will display "4h", properly rounding your time.
The widget will display "5h", showing that it correctly rounded at the
end
of calculations (otherwise it would show "6h").
@osuosl/devs
Fixes #52.
Changes in this PR.
Testing this PR.
Expected Output.
@osuosl/devs