Class: Kiss::Format::Time

Inherits:
DateTime show all
Defined in:
lib/kiss/format.rb

Class Method Summary collapse

Methods inherited from DateTime

convert_value_local_to_utc, convert_value_utc_to_local, parse, validate

Methods inherited from Kiss::Format

inherited, lookup, parse, validate

Class Method Details

.value_to_s(value, context = {}) ⇒ Object



168
169
170
# File 'lib/kiss/format.rb', line 168

def self.value_to_s(value, context = {})
  convert_value_utc_to_local(value, context).strftime("%I:%M %p").gsub(/0(\d[\:\/])/, '\1')
end