Sha256: bbdd31c8e7c4bac764c0dcbdb56b69ce25c64eb12c53dc6690a359cb77ac7fe8

Contents?: true

Size: 772 Bytes

Versions: 1

Compression:

Stored size: 772 Bytes

Contents

module RiCal
  class Component
    class Timezone
      #- ©2009 Rick DeNatale
      #- All rights reserved. Refer to the file README.txt for the license
      #
      # A DaylightPeriod is a TimezonePeriod during which daylight saving time *is* in effect
      class DaylightPeriod < TimezonePeriod #:nodoc: all

        def self.entity_name #:nodoc:
          "DAYLIGHT"
        end

        def dst?
          true
        end

        def swallows_local?(local, std_candidate)
          ([local.year, local.month, local.day] == [dtstart.year,dtstart.month, dtstart.day]) && 
             local >= dtstart_property &&
             local.advance(:seconds => (utc_total_offset - std_candidate.utc_total_offset)) < dtstart_property
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubyredrick-ri_cal-0.0.2 lib/ri_cal/component/timezone/daylight_period.rb