Icalendar rrule parser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
samueljones
Forum Newbie
Posts: 1
Joined: Tue Apr 01, 2008 4:49 pm

Icalendar rrule parser

Post by samueljones »

Hey folks,

I need to build some code that takes the rrule string off of an iCalendar event and figures out what the actual dates are that the rrule applies. I want something that, given an rrule string as described in theiCalendar standard and a start date, can return an array of UNIX timestamps outlining the rest of the events (within limits if it's an infinitely recurring date). I'd also like something that can handle the much easier task of producing an rrule string from a set of values set in methods.

It seems to me that, as iCalendar is a pretty widespread standard, and the kind of class I'm thinking of is a pretty obvious way to parse and print RRULES, that someone beat me to creating this class. So here's my question: Does anyone know of a general purpose or adaptable bit of code for handling rrule strings?

The only thing I've found is this: http://www.weberdev.com/Print-Code-Exam ... mode=color which has some rrule parsing material, but it doesn't do any of the date math I need done, so I don't know if it's worth adapting.
gearond
Forum Newbie
Posts: 1
Joined: Wed Dec 01, 2010 1:31 pm

Re: Icalendar rrule parser

Post by gearond »

The code in ICalCreator from kigconsult.se is VERY good. I recommend it.

http://www.kigkonsult.se/iCalcreator/
Post Reply