Sha256: 7d93a009ecc66e22e478bec7f3f55bcdc3f671ed1bee9e489e30e12ec3a079b7

Contents?: true

Size: 1.69 KB

Versions: 1

Compression:

Stored size: 1.69 KB

Contents

=begin
  Copyright (C) 2005 Jeff Rose

  This library is free software; you can redistribute it and/or modify it
  under the same terms as the ruby language itself, see the file COPYING for
  details.
=end
module Icalendar
  # A Timezone is unambiguously defined by the set of time
  # measurement rules determined by the governing body for a given
  # geographic area. These rules describe at a minimum the base offset
  # from UTC for the time zone, often referred to as the Standard Time
  # offset. Many locations adjust their Standard Time forward or backward
  # by one hour, in order to accommodate seasonal changes in number of
  # daylight hours, often referred to as Daylight  Saving Time. Some
  # locations adjust their time by a fraction of an hour. Standard Time
  # is also known as Winter Time. Daylight Saving Time is also known as
  # Advanced Time, Summer Time, or Legal Time in certain countries. The
  # following table shows the changes in time zone rules in effect for
  # New York City starting from 1967. Each line represents a description
  # or rule for a particular observance.
  class Timezone < Component
    
    # Single properties
    ical_property :dtstart, :start
    ical_property :tzoffsetto, :timezone_offset_to
    ical_property :tzoffsetfrom, :timezone_offset_from
    
    # Multi-properties
    ical_multi_property :comment, :comment, :comments
    ical_multi_property :rdate, :recurrence_date, :recurrence_dates
    ical_multi_property :rrule, :recurrence_rule, :recurrence_rules
    
    def initialize()
      super("VTIMEZONE")
      @components = components
    end

    def to_ical
      super.to_s { |s| s << @components.each { |component| component.to_s } }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
icalendar-0.95 lib/icalendar/component/timezone.rb