class Vcard::V3_0::PropertyValue::Time
Public Class Methods
new(val)
click to toggle source
# File lib/vobject/vcard/v3_0/propertyvalue.rb, line 230 def initialize(val) self.value = val self.type = "time" end
Public Instance Methods
to_hash()
click to toggle source
# File lib/vobject/vcard/v3_0/propertyvalue.rb, line 245 def to_hash value end
to_s()
click to toggle source
# File lib/vobject/vcard/v3_0/propertyvalue.rb, line 235 def to_s ret = "#{value[:hour]}:#{value[:min]}:#{value[:sec]}" ret = ret + ".#{value[:secfrac]}" if value[:secfrac] zone = "" zone = "Z" if value[:zone] && value[:zone] == "Z" zone = "#{value[:zone][:sign]}#{value[:zone][:hour]}:#{value[:zone][:min]}" if value[:zone] && value[:zone].is_a?(Hash) ret = ret + zone ret end