mangstadt / biweekly

biweekly is an iCalendar library written in Java.
BSD 2-Clause "Simplified" License
323 stars 44 forks source link

Iterator for Union of RecurrenceRule, RecurrenceDates, and ExceptionDates #35

Closed toby-cisco closed 8 years ago

toby-cisco commented 8 years ago

I'm curious if it is possible to combine a biweekly.property.RecurrenceRule, a biweekly.property.RecurrenceDates, and an biweekly.property.ExceptionDate and then obtain a DateIterator (or some variant of it) of their union? The application I am working on will need to account for RDates and ExDates when computing occurrences of an event from a recurrence rule. The getDateIterator method on biweekly.property.RecurrenceRule does not appear to handle RecurrenceDates and ExceptionDates.

The static join method in com.google.ical.iter.RecurrenceIteratorFactory would appear to do what I need. Just curious if there is some analogous functionality in the biweekly package.

mangstadt commented 8 years ago

Hi Toby,

Thank you for the idea. I will look into it.

mangstadt commented 8 years ago

Toby,

You are correct. The join method can be used to do this.

I implemented this feature in 73909d7841fce3d9a1ac46e1d457c5e899442fec. If you get a chance, please try it out. Thank you.

toby-cisco commented 8 years ago

Mike,

The change you made appears to work just fine and does what I need. Thank you!

When were you planning to do the next release?

mangstadt commented 8 years ago

Toby,

Thank you for testing it. I don't know when I will release a new stable version. It has been almost two months since the last version, so maybe soon.