code: def parse(value):
          
          match_result = RE_DATE.match(value)
          if match_result is None:
              raise ValueError('date data has invalid format "%s"' % value)
  
          value = date_from_match(match_result)
  
          return value
docs: Parse the string date.
  
          This supports the subset of ISO8601 used by xsd:date, but is lenient
          with what is accepted, handling most reasonable syntax.
  
          Any timezone is parsed but ignored  because a) it's meaningless without
          a time and b) B{datetime}.I{date} does not support a tzinfo property.
  
          @param value: A date string.
          @type value: str
          @return: A date object.
          @rtype: B{datetime}.I{date}