(value)
r"""Convert a string such as ``19 December 2018`` ``August 02, 2019\n`` to a :class:`datetime.date` object.
r"""Convert a string such as ``19 December 2018`` ``August 02, 2019\n`` to a :class:`datetime.date` object.
r Convert a string such as 19 December 2018 August 02 2019 \ n to a : class : datetime . date object .
def parse_date_wiki(value):
    r"""Convert a string such as ``19 December 2018`` ``August 02, 2019\n`` to a :class:`datetime.date` object."""
    value = parse_data_wiki(value)
    if value == 'Unknown':
        value = '30 April 2008'
    if len(value) < 15:
        if not value[:1].isdigit():  # Only Month Year
            value = '30 ' + value
        if len(value) < 5:  # Only Year
            value = '30 April ' + value
    try:
        return datetime.datetime.strptime(value, '%d %B %Y').date() if value else None
    except ValueError:
        return datetime.datetime.strptime(value, '%B %d, %Y').date() if value else None
def parse_date_wiki ( value ) : value = parse_data_wiki ( value ) if value == 'Unknown' : value = '30 April 2008' if len ( value ) < 15 : if not value [ : 1 ] . isdigit ( ) : # Only Month Year value = '30 ' + value if len ( value ) < 5 : # Only Year value = '30 April ' + value try : return datetime . datetime . strptime ( value , '%d %B %Y' ) . date ( ) if value else None except ValueError : return datetime . datetime . strptime ( value , '%B %d, %Y' ) . date ( ) if value else None