module Icalendar::TimezoneTransition
Public Instance Methods
dtstart()
click to toggle source
# File lib/icalendar/tzinfo.rb, line 80 def dtstart (respond_to?(:local_start_at) ? local_start_at : local_start).to_datetime.strftime '%Y%m%dT%H%M%S' end
offset_abbreviation()
click to toggle source
# File lib/icalendar/tzinfo.rb, line 61 def offset_abbreviation offset.abbreviation.to_s end
offset_from()
click to toggle source
# File lib/icalendar/tzinfo.rb, line 53 def offset_from previous_offset.ical_offset end
offset_to()
click to toggle source
# File lib/icalendar/tzinfo.rb, line 57 def offset_to offset.ical_offset end
rrule()
click to toggle source
# File lib/icalendar/tzinfo.rb, line 65 def rrule start = (respond_to?(:local_start_at) ? local_start_at : local_start).to_datetime # this is somewhat of a hack, but seems to work ok # assumes that no timezone transition is in law as "4th X of the month" # but only as 1st X, 2nd X, 3rd X, or Last X start_week = ((start.day - 1) / 7).to_i + 1 start_week = (start_week > 3) ? -1 : start_week [sprintf( 'FREQ=YEARLY;BYMONTH=%d;BYDAY=%d%s', start.month, start_week, start.strftime('%a').upcase[0,2] )] end