@property
    def select_options(self):
        start_year = getattr(settings, 'START_YEAR', 2008)
        years = [dict(val=unicode(y), text=y) for y in range(start_year, datetime.utcnow().year + 1)]
        years.reverse()
        months = [dict(val="%02d" % m, text=calendar.month_name[m]) for m in range(1, 13)]
        now = datetime.now()
        three_month_earlier = now - relativedelta(months=3)

        first_friday = rrule(DAILY,
                             dtstart=datetime(three_month_earlier.year, three_month_earlier.month, 1),
                             until=now,
                             byweekday=FR)[0]
        if first_friday.day != 1:
            first_friday = first_friday - relativedelta(days=7)
        fridays = rrule(WEEKLY, dtstart=first_friday, until=now, byweekday=FR)
        weeks = []
        value = None
        text = None
        for idx, val in enumerate(fridays):
            try:
                value = '{0}|{1}'.format(val.strftime("%Y-%m-%d"), fridays[idx + 1].strftime("%Y-%m-%d"))
                text = '{0} - {1}'.format(
                    ews_date_format(val),
                    ews_date_format(fridays[idx + 1] - relativedelta(days=1))
                )
            except IndexError:
                next_thursday = val + relativedelta(days=6)
                value = '{0}|{1}'.format(val.strftime("%Y-%m-%d"), next_thursday.strftime("%Y-%m-%d"))
                text = '{0} - {1}'.format(ews_date_format(val), ews_date_format(next_thursday))
            finally:
                weeks.append(dict(val=value, text=text))
        return [
            {
                'text': 'Week (Friday - Thursday)',
                'val': 2,
                'firstOptions': weeks,
                'secondOptions': []
            },
            {
                'text': 'Month',
                'val': 1,
                'firstOptions': months,
                'secondOptions': years
            }

        ]
dataset/ETHPy150Open dimagi/commcare-hq/custom/ewsghana/filters.py/EWSDateFilter.select_options/original