1
0
Fork 0
oldhaven/rails/app/helpers/application_helper.rb

15 lines
228 B
Ruby
Raw Normal View History

2011-04-03 16:21:05 +00:00
module ApplicationHelper
end
2011-04-06 20:59:50 +00:00
class Numeric
def toSeconds
(self / 1000).round
end
def toTime
s = self.toSeconds
m = (s / 60).floor
s -= m * 60
m.to_s << ':' << (s < 10 ? '0' : '') << s.to_s
end
end