def strftime(to_format):
    """strftime(to_format)(dt_obj) -> str

    Return datetime, time or date object dt_obj formatted with to_format.

    :: str -> (datetime.datetime|datetime.date|datetime.time) -> str

    >>> strftime('%Y-%m-%d')(datetime.date(2112, 12, 21))
    '2112-12-21'
    """
    return lambda dt_obj: dt_obj.strftime(to_format)