Implement projected time
This commit is contained in:
@@ -7,14 +7,15 @@ module ContestsHelper
|
||||
end
|
||||
|
||||
def display_time(time)
|
||||
if time == nil
|
||||
return ""
|
||||
end
|
||||
h = time / 3600
|
||||
m = (time % 3600) / 60
|
||||
s = (time % 3600) % 60
|
||||
if h > 0
|
||||
return h.to_s + ":" + pad(m) + ":" + pad(s)
|
||||
elsif m > 0
|
||||
return m.to_s + ":" + pad(s)
|
||||
end
|
||||
"0:" + pad(s)
|
||||
m.to_s + ":" + pad(s)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user