diff --git a/personnummer/personnummer.py b/personnummer/personnummer.py index 2224db2..69628f6 100644 --- a/personnummer/personnummer.py +++ b/personnummer/personnummer.py @@ -211,7 +211,7 @@ def test_date(year, month, day): Test if the input parameters are a valid date or not """ for x in ['19', '20']: - new_y = x.__str__() + year.__str__() + new_y = x.__str__() + year.__str__().zfill(2) new_y = int(new_y) try: date = datetime.date(new_y, month, day)