Module: RiCal::CoreExtensions::Time::Conversions
- Included in:
- Time
- Defined in:
- lib/ri_cal/core_extensions/time.rb
Instance Method Summary collapse
- #to_overlap_range_start ⇒ Object (also: #to_overlap_range_end)
-
#to_ri_cal_date_time_value(timezone_finder = nil) ⇒ Object
(also: #to_ri_cal_date_or_date_time_value, #to_ri_cal_occurrence_list_value)
Return an RiCal::PropertyValue::DateTime representing the receiver.
-
#to_ri_cal_property_value(timezone_finder = nil) ⇒ Object
Return the natural ri_cal_property for this object.
-
#with_floating_timezone ⇒ Object
Return a copy of this object which will be interpreted as a floating time.
Instance Method Details
#to_overlap_range_start ⇒ Object Also known as: to_overlap_range_end
25 26 27 |
# File 'lib/ri_cal/core_extensions/time.rb', line 25 def to_overlap_range_start to_datetime end |
#to_ri_cal_date_time_value(timezone_finder = nil) ⇒ Object Also known as: to_ri_cal_date_or_date_time_value, to_ri_cal_occurrence_list_value
Return an RiCal::PropertyValue::DateTime representing the receiver
10 11 12 13 14 15 |
# File 'lib/ri_cal/core_extensions/time.rb', line 10 def to_ri_cal_date_time_value(timezone_finder = nil) #:nodoc: RiCal::PropertyValue::DateTime.new( timezone_finder, :value => strftime("%Y%m%dT%H%M%S"), :params => {"TZID" => self.tzid || :default}) end |
#to_ri_cal_property_value(timezone_finder = nil) ⇒ Object
Return the natural ri_cal_property for this object
21 22 23 |
# File 'lib/ri_cal/core_extensions/time.rb', line 21 def to_ri_cal_property_value(timezone_finder = nil) #:nodoc: to_ri_cal_date_time_value(timezone_finder) end |
#with_floating_timezone ⇒ Object
Return a copy of this object which will be interpreted as a floating time.
32 33 34 |
# File 'lib/ri_cal/core_extensions/time.rb', line 32 def with_floating_timezone dup.set_tzid(:floating) end |