mikaello / norwegian-national-id-validator

Validate Norwegian national identity numbers
https://mikaello.github.io/norwegian-national-id-validator
MIT License
24 stars 7 forks source link

Why possibleAgesOfPersonWithIdNumber could return more than one age ? #4

Closed Zabaa closed 5 years ago

Zabaa commented 6 years ago

https://github.com/mikaello/norwegian-national-id-validator/blob/d03063ab125dd46dc46e25b944f741a27e8971b4/src/index.js#L20

Hello. I'm not really sure why this method returns array of numbers instead of concrete age ? I was looking at example from this post . In line 115 there's additional verification if year are within allowed range so at the end as a result we can get concrete birthdate.

Regards

mikaello commented 5 years ago

Thanks for posting the issue! This seem to be a bug.

I have given an answer to this question in issue 6, I am therefore closing this issue.