Skip to content

Instantly share code, notes, and snippets.

@veriojon
Created March 31, 2011 01:11
Show Gist options
  • Save veriojon/895635 to your computer and use it in GitHub Desktop.
Save veriojon/895635 to your computer and use it in GitHub Desktop.
date stuff again
def is_valid(self, value):
# try:
if parser.parse(value).year < 1900:
fail("Year is below min value of 1900 for field '%s'" % self.label)
return True
# except:
# fail("Invalid date for field '%s'" % self.label)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment