def between(self, after, before, inc=False, count=<NUM_LIT:1>):
if self._cache_complete:<EOL><INDENT>gen = self._cache<EOL><DEDENT>else:<EOL><INDENT>gen = self<EOL><DEDENT>started = False<EOL>l = []<EOL>if inc:<EOL><INDENT>for i in gen:<EOL><INDENT>if i > before:<EOL><INDENT>break<EOL><DEDENT>elif not started:<EOL><INDENT>if i >= after:<EOL><INDENT>started = True<EOL>l.append(i)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>l.append(i)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for i in gen:<EOL><INDENT>if i >= before:<EOL><INDENT>break<EOL><DEDENT>elif not started:<EOL><INDENT>if i > after:<EOL><INDENT>started = True<EOL>l.append(i)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>l.append(i)<EOL><DEDENT><DEDENT><DEDENT>return l<EOL>
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.