Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of occurrence dates from iCalendar RRULE

I have the iCalendar file with RRULE for occurrences. How to get the list of dates on which the event will be occurring as per given start date and RRULE in the iCal file.

In Java, I want to write a method which should take start date and RRULE and return me the list of occurrence dates. Please help with simple solution or directions.

like image 760
user846316 Avatar asked Jul 15 '11 11:07

user846316


2 Answers

There is a Java library specifically for parsing RRULEs called google-rfc-2445.

The following link contains an example using the library where you supply a start date along with an RRULE and it prints out the dates.

http://google-rfc-2445.googlecode.com/svn/trunk/README.html

like image 141
Mark McLaren Avatar answered Oct 15 '22 16:10

Mark McLaren


I do not have a chance to read README because of 404 - The requested URL /svn/trunk/README.html was not found on this server. If you have an example to show, please share it. I've found another solution lib-recur. lib-recur is shared via maven repository.

like image 28
Sergii Avatar answered Oct 15 '22 16:10

Sergii