@classmethod
    def get_date(cls, type=None, month_or_quarter=None, year=None, format=ISO_DATE_FORMAT,
                 inclusive=True, timezone=pytz.utc):
        if month_or_quarter is None:
            month_or_quarter = datetime.datetime.date.today().month
        if year is None:
            year = datetime.datetime.date.today().year
        assert isinstance(month_or_quarter, int) and isinstance(year, int)
        if type == 3:
            start = datetime(int(year), 1, 1)
            end = datetime(int(year), 12, 31)
        elif type == 2:
            quarters = list(rrule.rrule(rrule.MONTHLY,
                                        bymonth=(1, 4, 7, 10),
                                        bysetpos=-1,
                                        dtstart=datetime(year, 1, 1),
                                        count=5))

            start = quarters[month_or_quarter - 1]
            end = quarters[month_or_quarter] - relativedelta(days=1)
        else:
            start = datetime(year, month_or_quarter, 1)
            end = start + relativedelta(months=1) - relativedelta(days=1)
        return DateSpan(start, end, format, inclusive, timezone)
Generate a DateSpan object given type, month or quarter and year.
dataset/ETHPy150Open dimagi/commcare-hq/custom/ilsgateway/tanzania/__init__.py/ILSDateSpan.get_date