Last Modified
2013-07-26 18:33:11 +0000
Requires

Description

Copyright (C) 2008 Sean Dague

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.

# The following adds a bunch of mixins to the tzinfo class, with the # intent on making it very easy to load in tzinfo data for generating # ical events. With this you can do the following: # # require "icalendar/tzinfo" # # estart = DateTime.new(2008, 12, 29, 8, 0, 0) # eend = DateTime.new(2008, 12, 29, 11, 0, 0) # tstring = "America/Chicago" # # tz = TZInfo::Timezone.get(tstring) # cal = Calendar.new # # the mixins now generate all the timezone info for the date in question # timezone = tz.ical_timezone(estart) # cal.add(timezone) # # cal.event do # dtstart estart # dtend eend # summary "Meeting with the man." # description "Have a long lunch meeting and decide nothing..." # klass "PRIVATE" # end # # puts cal.to_ical # # The recurance rule calculations are hacky, and only start at the # beginning of the current dst transition. I doubt this works for non # dst areas yet. However, for a standard dst flipping zone, this # seems to work fine (tested in Mozilla Thunderbird + Lightning). # Future goal would be making this better.