'Returns all the occurrences of the rrule between after and before.
The inc keyword defines what happens if after and/or before are
themselves occurrences. With inc=True, they will be included in the
list, if they are found in the recurrence set.'

def between(self, after, before, inc=False, count=1):

    if self._cache_complete:
        gen = self._cache
    else:
        gen = self
    started = False
    l = []
    if inc:
        for i in gen:
            if (i > before):
                break
            elif (not started):
                if (i >= after):
                    started = True
                    l.append(i)
            else:
                l.append(i)
    else:
        for i in gen:
            if (i >= before):
                break
            elif (not started):
                if (i > after):
                    started = True
                    l.append(i)
            else:
                l.append(i)
    return l
