docs: def to_date_field(formatter):
      """
      Returns a callable instance that will convert a string to a Date.
  
      :param formatter: String that represents data format for parsing.
      :return: instance of the DateConverter.
      """
      class DateConverter(object):
  
          def __init__(self, formatter):
              self.formatter = formatter
  
          def __call__(self, value):
              if isinstance(value, string_types):
                  value = datetime.strptime(value, self.formatter).date()
  
              if isinstance(value, datetime):
                  value = value.date()
  
              return value
  
      return DateConverter(formatter)