lib/ig_markets/format.rb
# Returns a formatted string for the specified number of seconds in the format `[<hours>:]<minutes>:<seconds>`.
#
# @param [Integer] value The number of seconds to format.
#
# @return [String]
Returns a formatted string for the specified number of seconds in the format `[:]:`.
Returns a formatted string for the specified number of seconds in the format ` [ : ] : ` .
def seconds(value)
      result = if value >= 60 * 60
                 "#{value / 60 / 60}:#{Kernel.format('%02i', (value / 60) % 60)}"
               else
                 (value / 60).to_s
               end
      "#{result}:#{Kernel.format('%02i', value % 60)}"
    end
def seconds ( value ) result = if value >= 60 * 60 "#{value / 60 / 60}:#{Kernel.format('%02i', (value / 60) % 60)}" else ( value / 60 ) . to_s end "#{result}:#{Kernel.format('%02i', value % 60)}" end
Returns a formatted string for the specified number of seconds in the format `[<hours>:]<minutes>:<seconds>`.
Returns a formatted string for the specified number of seconds in the format ` [ <hours > : ] <minutes > : <seconds > ` .
None
String
value
value The number of seconds to format.
value The number of seconds to format .