class InoxConverter::TimeFormat
Public Instance Methods
formatTime(value, unit)
click to toggle source
# File lib/inox_converter/time_format.rb, line 15 def formatTime(value, unit) time = getInDictionary(unit) newTime = value.strftime(time) return newTime end
initDictionary()
click to toggle source
# File lib/inox_converter/time_format.rb, line 5 def initDictionary @dictionary = Hash.new @dictionary = { "24hm" => "%R", "12hm" => "%I:%M %p", "24hms" => "%X", "12hms" => "%I:%M:%S %p" } end