from datetime import datetime


def date_to_year(instance):
    """
    "date-to-year" converter for the "mapTo" keyword validator.
    """
    dt = datetime.strptime(instance, '%Y-%m-%d')
    return str(dt.year)