import re


def date_is_valid(date: str) -> bool:
    """
    Check whether given date is of format YYYY-MM-DD
    :param date: Date passed as string.
    :return: True if date has format YYYY-MM-DD, False otherwise.
    """
    if re.fullmatch("\\d{4}-\\d{2}-\\d{2}", date):
        return True
    return False