libical
First of all make sure you have libical installed. Without it the gem won’t install.
$ gem sources -a http://gems.github.com (if you haven't already) $ sudo gem install erdgeist-chaos_calendar
If the install fails because of missing header files try:
$ sudo gem install erdgeist-chaos_calendar -- --with-ical-include=/path/to/include/dir
on Mac OS X
$ sudo gem install erdgeist-chaos_calendar -- --with-ical-include=/opt/local/include
on FreeBSD:
$ sudo gem install erdgeist-chaos_calendar -- --with-ical-include=/usr/local/include
irb >> require 'chaos_calendar' occ_array = ChaosCalendar::occurrences( "20000101T230000", "20091231T230000", "FREQ=DAILY;COUNT=1200" )
Be aware that the array is in UTC and will be converted to your local timezone before it is used.