Skip to content

Instantly share code, notes, and snippets.

@jish
Created December 14, 2009 00:07
Show Gist options
  • Save jish/255685 to your computer and use it in GitHub Desktop.
Save jish/255685 to your computer and use it in GitHub Desktop.
require 'open-uri'
require 'rubygems'
require 'ri_cal'
ics = open("http://www.google.com/calendar/ical/2skt4ks0v2ka25svaitomsnc60%40group.calendar.google.com/public/basic.ics")
cal = RiCal.parse(ics)
cal.first.events.each do |event|
puts event.start_time
end
# 2008-02-07T19:30:00-08:00
# 2009-05-15T02:30:00+00:00
# 2008-02-07T19:30:00-08:00
# 2009-01-09T03:30:00+00:00
# 2007-03-29T00:00:00+00:00
# 2008-07-11T02:30:00+00:00
# 2008-01-11T04:00:00+00:00
# 2006-07-06T19:30:00-07:00
# 2007-11-14T03:00:00+00:00
# 2007-03-22T00:00:00+00:00
# 2007-03-15T00:00:00+00:00
# 2007-03-08T00:00:00+00:00
# 2006-07-19T19:30:00-07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment