(max_days, date1, date2)
return abs(date1 - date2) <= timedelta(max_days)
Returns True if date1 is less than or equal to max_days away from
    date2, otherwise returns False

    >>> from datetime import date
    >>> le_days_diff(364, '2018-01-01', '2017-01-20')
    True
    >>> le_days_diff(364, date(2017, 1, 20), date(2018, 1, 1))
    True
    >>> le_days_diff(364, '2018-01-01', '2020-01-20')
    False
Returns True if date1 is less than or equal to max_days away from
    date2, otherwise returns False
Returns True if date1 is less than or equal to max_days away from date2 otherwise returns False
def le_days_diff(max_days, date1, date2):
    """
    Returns True if date1 is less than or equal to max_days away from
    date2, otherwise returns False

    >>> from datetime import date
    >>> le_days_diff(364, '2018-01-01', '2017-01-20')
    True
    >>> le_days_diff(364, date(2017, 1, 20), date(2018, 1, 1))
    True
    >>> le_days_diff(364, '2018-01-01', '2020-01-20')
    False

    """
    if isinstance(date1, str):
        date1 = parse_date(date1)
    if isinstance(date2, str):
        date2 = parse_date(date2)
    return abs(date1 - date2) <= timedelta(max_days)
def le_days_diff ( max_days , date1 , date2 ) : if isinstance ( date1 , str ) : date1 = parse_date ( date1 ) if isinstance ( date2 , str ) : date2 = parse_date ( date2 ) return abs ( date1 - date2 ) <= timedelta ( max_days )