def METHOD_NAME(self, date_str, relative_base=None):
    "Parse date string passed in date filter of query to datetime object"
    # clean date string to handle future date parsing by date parser
    future_strings = ["later", "from now", "from today"]
    prefer_dates_from = {True: "future", False: "past"}[any([True for fstr in future_strings if fstr in date_str])]
    clean_date_str = re.sub("|".join(future_strings), "", date_str)
    # parse date passed in query date filter
    parsed_date = dtparse.METHOD_NAME(
        clean_date_str,
        settings={
            "RELATIVE_BASE": relative_base or datetime.now(),
            "PREFER_DAY_OF_MONTH": "first",
            "PREFER_DATES_FROM": prefer_dates_from,
        },
    )
    if parsed_date is None:
        return None
    return self.date_to_daterange(parsed_date, date_str)