<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stringToDate(fmt="%Y-%m-%d"):

 """returns a function to convert a string to a datetime.date instance
 using the formatting string fmt as in time.strftime"""

    import time
    import datetime
    def conv_func(s):
        return datetime.date(*time.strptime(s,fmt)[:3])
    return conv_func