Open grebulon opened 6 years ago
How is this going?
If a rrule has no until
nor count
, does that mean it is an endless rrule?
If an rrule has an until
or count
, it is definitely not endless.
Can you think of any case where the inverse is true?
Ie, is there some combination of rule statements eg. byweekno, bysetpos, byweekday, byyearday that results in a finite set of dates? If so, then simply checking for the presence of count
and until
is not sufficient, and the problem becomes much more complex.
But I am not sure such a combination exists. Given that time is infinite, any combination of rules, no matter how sparse, is bound to have an unlimited number of recurrences.
So I think checking for those properties is probably OK.
I am not actively working on this feature, but would consider a PR that follows our PR guidelines.
Loop over the rules in a set and return true if at least one of the rules is endless. Optionally, return the date of the final recurrence of the set.