Sha256: 218c7cb1225906329c0a8af67d1722d5ebf9e7f65f142228128cb47b896fdb01
Contents?: true
Size: 1.87 KB
Versions: 44
Compression:
Stored size: 1.87 KB
Contents
class Subject def initialize(out=STDOUT) cals = RiCal.parse_string <<-END_OF_DATA BEGIN:VCALENDAR METHOD:PUBLISH X-WR-TIMEZONE:America/New_York PRODID:-//Apple Inc.//iCal 3.0//EN CALSCALE:GREGORIAN X-WR-CALNAME:Test VERSION:2.0 X-WR-RELCALID:58DB0663-196B-4B6B-A05A-A53049661280 X-APPLE-CALENDAR-COLOR:#0252D4 BEGIN:VTIMEZONE TZID:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 DTSTART:19810329T020000 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU TZNAME:CEST END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:+0200 TZOFFSETTO:+0100 DTSTART:19961027T030000 RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU TZNAME:CET END:STANDARD END:VTIMEZONE BEGIN:VTIMEZONE TZID:US/Eastern BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 DTSTART:20070311T020000 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU TZNAME:EDT END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:-0400 TZOFFSETTO:-0500 DTSTART:20071104T020000 RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU TZNAME:EST END:STANDARD END:VTIMEZONE BEGIN:VEVENT SEQUENCE:3 TRANSP:OPAQUE UID:AC2EFB19-A8A8-49EF-929F-CA0975374ED6 DTSTART:20090501T000000Z DTSTAMP:20090501T174405Z SUMMARY:UTC Event CREATED:20090501T174347Z DTEND:20090501T010000Z END:VEVENT BEGIN:VEVENT SEQUENCE:2 TRANSP:OPAQUE UID:A5517A09-C53E-4E1F-A642-EA47680BF2B6 DTSTART;TZID=US/Eastern:20090430T140000 DTSTAMP:20090501T174428Z SUMMARY:Eastern Event CREATED:20090501T174415Z DTEND;TZID=US/Eastern:20090430T150000 END:VEVENT BEGIN:VEVENT SEQUENCE:3 TRANSP:OPAQUE UID:B5024763-9197-4A60-A96E-D8D59D578BB2 DTSTART;TZID=Europe/Paris:20090430T140000 DTSTAMP:20090501T174509Z SUMMARY:Paris Event CREATED:20090501T174439Z DTEND;TZID=Europe/Paris:20090430T150000 END:VEVENT END:VCALENDAR END_OF_DATA cal = cals.first event = cal.events.find {|event| event.summary == "Paris Event"} @date_time = event.dtstart_property end def run puts "start" @date_time.in_time_zone("US/Eastern") puts "done" end end
Version data entries
44 entries across 44 versions & 9 rubygems