def date_from_isoformat(isoformat_date):
    """Convert an ISO-8601 date into a `datetime.date` object.

    Argument:
        isoformat_date (str): a date in ISO-8601 format (YYYY-MM-DD)

    Returns:
        ~datetime.date: the object corresponding to the given ISO date.

    Raises:
        ValueError: when the date could not be converted successfully.

    See Also:
        `ISO-8601 specification <https://en.wikipedia.org/wiki/ISO_8601>`_.
    """
    year, month, day = isoformat_date.split('-')
    return datetime.date(int(year), int(month), int(day))
def date_from_isoformat ( isoformat_date ) : year , month , day = isoformat_date . split ( '-' ) return datetime . date ( int ( year ) , int ( month ) , int ( day ) )
Convert an ISO-8601 date into a `datetime.date` object.

    Argument:
        isoformat_date (str): a date in ISO-8601 format (YYYY-MM-DD)

    Returns:
        ~datetime.date: the object corresponding to the given ISO date.

    Raises:
        ValueError: when the date could not be converted successfully.

    See Also:
        `ISO-8601 specification <https://en.wikipedia.org/wiki/ISO_8601>`_.