module Roo::Formatters::Base
Public Instance Methods
integer_to_timestring(content)
click to toggle source
converts an integer value to a time string like '02:05:06'
# File lib/roo/formatters/base.rb, line 5 def integer_to_timestring(content) h = (content / 3600.0).floor content -= h * 3600 m = (content / 60.0).floor content -= m * 60 s = content Kernel.format("%02d:%02d:%02d", h, m, s) end