mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 00:36:12 +01:00
Don't round in ttc.min_sec method
This fixes a bug where it would round 1.8 days up to 2 days, and still display the extra hours in addition.
This commit is contained in:
parent
03282638af
commit
c4433a5ea9
2 changed files with 9 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ module Stats
|
|||
def min_sec
|
||||
min_sec = arbitrary_day + min_in_seconds # convert to a datetime
|
||||
@min_sec = min_sec.strftime("%H:%M:%S")
|
||||
@min_sec = min.round.to_s + " days " + @min_sec if min >= 1
|
||||
@min_sec = min.floor.to_s + " days " + @min_sec if min >= 1
|
||||
@min_sec
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue