def date_to_ymd(date):
    """
    Returns dict like {'y': ..., 'm': ..., 'd': ...}

    >>> date_to_ymd(datetime.date(year=2010, month=1, day=3))
    {'y': 2010, 'm': 1, 'd': 3}
    """
    d = {
        'y': date.year,
        'm': date.month,
        'd': date.day
    }
    return(d)