Class: Vobject::Vcalendar::PropertyValue::Date
Instance Attribute Summary
#errors, #norm, #type, #value
Instance Method Summary
collapse
#name, #to_norm
Constructor Details
#initialize(val) ⇒ Date
Returns a new instance of Date.
245
246
247
248
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 245
def initialize(val)
self.value = val
self.type = "date"
end
|
Instance Method Details
#<=>(another) ⇒ Object
241
242
243
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 241
def <=>(another)
value <=> another.value
end
|
#to_hash ⇒ Object
254
255
256
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 254
def to_hash
value
end
|
#to_s ⇒ Object
250
251
252
|
# File 'lib/vobject/vcalendar/propertyvalue.rb', line 250
def to_s
sprintf("%04d%02d%02d", value.year, value.month, value.day)
end
|