from datetime import datetime


def parse_date(date_string, format='%Y-%m-%d'):
    """
    parse a date string
    :param date_string: a string representing a date
    :param format: format of the string, default to '%Y-%m-%d'
    :return: a date object
    """
    return datetime.strptime(date_string, format).date()