def clean(self, value):
        try:
            date = self.str_to_date(value)
        except __HOLE__, e:
            raise ValidationError("Date must be a valid date in the format YYYY-MM-DD.\n(%s)" % e.message)

        return date.strftime(self.DATE_FORMAT)
dataset/ETHPy150Open disqus/gargoyle/gargoyle/conditions.py/AbstractDate.clean