handle dates before 1900

this fixes an error in the django test suite:

ValueError: year=1 is before 1900; the datetime strftime() methods require year >= 1900