oldhaven/app/helpers/application_helper.rb
2011-04-21 03:05:32 +04:00

18 lines
256 B
Ruby

module ApplicationHelper
def navigation
end
end
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