Are personnummers where the date is February 29 valid?
Closed this issue · 3 comments
denizdogan commented
I have a function which automatically generates thousands of personnummers and it happened to generate 200002296127 (29 February, 2000, last four: 6127).
Is this a valid personnummer? personnummer.valid
returns False
for it, but I can't tell by looking at the source code whether or not this case has been accounted for.
frozzare commented
Hm, you're right. It's a problem with some 2000 century. Could you try this commit? f9adf3f
denizdogan commented
@frozzare That change seems to solve the problem for me :)
frozzare commented
Great @denizdogan
Published a new version to PyPi https://pypi.org/project/personnummer/1.0.2/