Chuck,
There are a couple of problems here:
1) There''s no event.rrule method. Use event.recurrence_rules instead.
2) Your RRULE line looks wrong. The UNTIL should have a = in it,
like this example from the spec:
RRULE:FREQ=DAILY;UNTIL=19971224T000000Z
Also, the tests are included in the gem. If you look where your gems
are installed on your system, most likely a /var/lib/gems or a
/var/lib/ruby/gems or similar, then if you look down deep enough
you''ll find an icalendar-0.97 directory. There''s a
"test" directory
there with unit tests in the Ruby language. They might help you.
I''m hacking in my spare time on extending the RRULE support so that
it''s no longer just a string but an object model. No word on when
I''ll be done, but I''ll post patches to this list if I get
something
useful working.
Hope this helps,
Larry
On 1/5/07, Chuck Smith <chuckssmith at gmail.com>
wrote:> Hi,
>
> I''m a relatively new Ruby developer and I''m trying to
convert an ical
> file into a MySQL database table. The biggest problem I have is how
> to parse rrule. Here is some sample event data from my ics file:
>
> BEGIN:VEVENT
> UID:-TTT-MONDAKALENDARO-ORG-__PUBLIC__-0000000122
> SUMMARY:Esperanta Kurso(Tenerife)
> DESCRIPTION:Hodia??\, 21-an de februaro\, okazas la malfermo de la 8-a
> Libervola Seminario por la universitata komunumo ??e la Fakultato pri
> Filologio : "Enkonduka Seminario pri Esperanto kaj ??ia
kulturo" ??e
> la Universitato de La Laguna\, Tenerifo\, Departamento de Angla kaj
> Germana Filologio ( http://www.ull.es )\, Campus de Guajara\, ES-38071
> La Laguna-. \n \nLa kurso da??re estas gvidata kaj organizata de la
> Prof. Alejandro LOPEZ DE VERGARA M?(c)ndez ( aflopez. at .ull.es -
> http://webpages.ull.es/users/aflopez/esp/index.htm ) kaj ??i okazos
> ??iuj mardoj- de la 18.30 ??is la 20.30- ??is junio.
> LOCATION:aflopez. at .ull.es
> CLASS:PUBLIC
> STATUS:CONFIRMED
> DTSTART;VALUE=DATETIME:20060314T000000
> DTSTAMP:20070105T151604Z
> RRULE:FREQ=DAILY;UNTIL la 20060314T160000Z
> END:VEVENT
>
> When I try to see event.dtend.to_s or event.end.to_s they only show
> nothing. If I try to look at event.rrule.to_s I get an error. Is
> there any examples I can view, so I can see how to grab this data? I
> read that there are test cases, but I do not understand how to view
> them. Any help you could provide would be greatly appreciated.
>
> Thanks!
> Chuck
> _______________________________________________
> icalendar-devel mailing list
> icalendar-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/icalendar-devel
>