happenings/utils/handlers.py
def _handle_weekly_repeat_out(self):
        """
        Handles repeating an event weekly (or biweekly) if the current
        year and month are outside of its start year and month.
        It takes care of cases 3 and 4 in _handle_weekly_repeat_in() comments.
        """
        start_d = _first_weekday(
            self.event.l_start_date.weekday(), date(self.year, self.month, 1)
        )
        self.day = start_d.day
        self.count_first = True
        if self.event.repeats('BIWEEKLY'):
            self._biweekly_helper()
        elif self.event.repeats('WEEKLY'):
            # Note count_first=True b/c although the start date isn't this
            # month, the event does begin repeating this month and start_date
            # has not yet been counted.
            # Also note we start from start_d.day and not
            # event.l_start_date.day
            self.repeat()
            if self.event.is_chunk():
                diff = self.event.start_end_diff
                self.count = _chunk_fill_out_first_week(
                    self.year, self.month, self.count, self.event, diff
                )
                for i in xrange(diff):
                    # count the chunk days, then repeat them
                    self.day = start_d.day + i + 1
                    self.repeat()
def _handle_weekly_repeat_out(self):
        """
        Handles repeating an event weekly (or biweekly) if the current
        year and month are outside of its start year and month.
        It takes care of cases 3 and 4 in _handle_weekly_repeat_in() comments.
        """
        start_d = _first_weekday(
            self.event.l_start_date.weekday(), date(self.year, self.month, 1)
        )
        self.day = start_d.day
        self.count_first = True
        if self.event.repeats('BIWEEKLY'):
            self._biweekly_helper()
        elif self.event.repeats('WEEKLY'):
            # Note count_first=True b/c although the start date isn't this
            # month, the event does begin repeating this month and start_date
            # has not yet been counted.
            # Also note we start from start_d.day and not
            # event.l_start_date.day
            self.repeat()
            if self.event.is_chunk():
                diff = self.event.start_end_diff
                self.count = _chunk_fill_out_first_week(
                    self.year, self.month, self.count, self.event, diff
                )
                for i in xrange(diff):
                    # count the chunk days, then repeat them
                    self.day = start_d.day + i + 1
                    self.repeat()
def _handle_weekly_repeat_out ( self ) : start_d = _first_weekday ( self . event . l_start_date . weekday ( ) , date ( self . year , self . month , 1 ) ) self . day = start_d . day self . count_first = True if self . event . repeats ( 'BIWEEKLY' ) : self . _biweekly_helper ( ) elif self . event . repeats ( 'WEEKLY' ) : # Note count_first=True b/c although the start date isn't this # month, the event does begin repeating this month and start_date # has not yet been counted. # Also note we start from start_d.day and not # event.l_start_date.day self . repeat ( ) if self . event . is_chunk ( ) : diff = self . event . start_end_diff self . count = _chunk_fill_out_first_week ( self . year , self . month , self . count , self . event , diff ) for i in xrange ( diff ) : # count the chunk days, then repeat them self . day = start_d . day + i + 1 self . repeat ( )
Handles repeating an event weekly (or biweekly) if the current
        year and month are outside of its start year and month.
        It takes care of cases 3 and 4 in _handle_weekly_repeat_in() comments.
Handles repeating an event weekly ( or biweekly ) if the current year and month are outside of its start year and month . It takes care of cases 3 and 4 in _handle_weekly_repeat_in () comments .