code: def set_creation_date(self, p_date=date.today()):
          
          self.fields['creationDate'] = p_date
  
          # not particularly pretty, but inspired by
          # http://bugs.python.org/issue1519638 non-existent matches trigger
          # exceptions, hence the lambda
          self.src = re.sub(
              r'^(x \d{4}-\d{2}-\d{2} |\([A-Z]\) )?(\d{4}-\d{2}-\d{2} )?(.*)$',
              lambda m:
              u"{}{} {}".format(m.group(1) or '', p_date.isoformat(),
                                  m.group(3)), self.src)
docs: Sets the creation date of a todo. Should be passed a date object.