<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def date_range(self):
 """Generate date range according to the `days` user input."""

        try:
            days = int(self.days)
        except ValueError:
            exit_after_echo(QUERY_DAYS_INVALID)

        if days < 1:
            exit_after_echo(QUERY_DAYS_INVALID)
        start = datetime.today()
        end = start + timedelta(days=days)
        return (
            datetime.strftime(start, '%Y-%m-%d'),
            datetime.strftime(end, '%Y-%m-%d')
        )