Right now I’m using google-rfc-2445 library to evaluate recurring events, and generate actual dates, for example to know when will occur event defined by following RRULE:
I see that both libraries have at some level interchangeable functionality, so my question, can I use single library (iCal4j/biweekly) for both tasks? Generate recurring events and export/import *.ics files?
If your goal is to generate iCalendar files, then you should use biweekly or iCal4j. If you need to iterate over the dates that are in a recurrence rule, then use google-rfc-2445. If you just need to create a recurrence rule, you don’t need google-rfc-2445.
biweekly allows you to iterate over the dates in a recurrence rule (see code below). It uses google-rfc-2445 to do this.
ICalendar ical = ... VEvent event = ical.getEvents().get(0); RecurrenceRule rrule = event.getRecurrenceRule(); Iterator<Date> it = rrule.getDateIterator(event.getDateStart().getValue());