def generateYearlySet()

in src/pycalendar/icalendar/recurrence.py [0:0]


    def generateYearlySet(self, start, items):
        # All possible BYxxx are valid, though some combinations are not

        # Start with initial date-time
        items.append(start.duplicate())

        if (self.mByMonth is not None) and (len(self.mByMonth) != 0):
            items[:] = self.byMonthExpand(items)

        if (self.mByWeekNo is not None) and (len(self.mByWeekNo) != 0):
            items[:] = self.byWeekNoExpand(items)

        if (self.mByYearDay is not None) and (len(self.mByYearDay) != 0):
            items[:] = self.byYearDayExpand(items)

        if (self.mByMonthDay is not None) and (len(self.mByMonthDay) != 0):
            items[:] = self.byMonthDayExpand(items)

        if (self.mByDay is not None) and (len(self.mByDay) != 0):
            # BYDAY is complicated:
            # if BYDAY is included with BYYEARDAY or BYMONTHDAY then it
            # contracts the recurrence set
            # else it expands it, but the expansion depends on the frequency
            # and other BYxxx periodicities

            if ((self.mByYearDay is not None) and (len(self.mByYearDay) != 0)) \
                    or ((self.mByMonthDay is not None) and (len(self.mByMonthDay) != 0)):
                items[:] = self.byDayLimit(items)
            elif (self.mByWeekNo is not None) and (len(self.mByWeekNo) != 0):
                items[:] = self.byDayExpandWeekly(items)
            elif (self.mByMonth is not None) and (len(self.mByMonth) != 0):
                items[:] = self.byDayExpandMonthly(items)
            else:
                items[:] = self.byDayExpandYearly(items)

        if (self.mByHours is not None) and (len(self.mByHours) != 0):
            items[:] = self.byHourExpand(items)

        if (self.mByMinutes is not None) and (len(self.mByMinutes) != 0):
            items[:] = self.byMinuteExpand(items)

        if (self.mBySeconds is not None) and (len(self.mBySeconds) != 0):
            items[:] = self.bySecondExpand(items)

        # Remove invalid items before BYSETPOS
        items[:] = filter(lambda x: not x.invalid(), items)

        if (self.mBySetPos is not None) and (len(self.mBySetPos) != 0):
            items[:] = self.bySetPosLimit(items)