Created
March 31, 2011 01:11
-
-
Save veriojon/895635 to your computer and use it in GitHub Desktop.
date stuff again
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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