HermannBjorgvin / Kennitala

Icelandic national ID (kennitölur) utilities for servers and clients.
MIT License
36 stars 10 forks source link

isPerson does not look at the last digit #20

Closed unnsteinngardars closed 3 years ago

unnsteinngardars commented 3 years ago

The last digit is the century, so I would think that future proofing for all upcoming centuries is not correct, that is, I would expect the last digit for a person to only be valid if it is 0 or 9. What do you think about this @HermannBjorgvin ?

HermannBjorgvin commented 3 years ago

@unnsteinngardars I suppose it's ok to have a breaking change once per century, so this validation would be good for about 80 years.

We can add this to the V2 refactor discussion, I don't see a reason not to include this in the next version.

https://github.com/HermannBjorgvin/Kennitala/discussions/19