mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use integer division - Crystal 0.31.0 change
This commit is contained in:
parent
5d5cc0a41e
commit
adbfb7da7c
2 changed files with 4 additions and 4 deletions
|
@ -25,15 +25,15 @@ module Spectator::Formatting
|
|||
return "#{seconds.round(2)} seconds" if seconds < 60
|
||||
|
||||
int_seconds = seconds.to_i
|
||||
minutes = int_seconds / 60
|
||||
minutes = int_seconds // 60
|
||||
int_seconds %= 60
|
||||
return sprintf("%i:%02i", minutes, int_seconds) if minutes < 60
|
||||
|
||||
hours = minutes / 60
|
||||
hours = minutes // 60
|
||||
minutes %= 60
|
||||
return sprintf("%i:%02i:%02i", hours, minutes, int_seconds) if hours < 24
|
||||
|
||||
days = hours / 24
|
||||
days = hours // 24
|
||||
hours %= 24
|
||||
sprintf("%i days %i:%02i:%02i", days, hours, minutes, int_seconds)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue