Method: RiCal::Component::TZInfoTimezone::Periods#add_period

Defined in:
lib/ri_cal/component/t_z_info_timezone.rb

#add_period(this_period, force = false) ⇒ Object



75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/ri_cal/component/t_z_info_timezone.rb', line 75

def add_period(this_period, force=false)
  if @previous_period || force
    if this_period.dst?
      period = daylight_period(this_period, @previous_period)
    else
      period = standard_period(this_period, @previous_period)
    end
    period.add_period(this_period)
    log_period(period)
  end
  @previous_period = this_period
end