Chris927 / generate-sa-idnumbers

Generate (fake) South African ID Numbers
GNU Lesser General Public License v3.0
47 stars 27 forks source link

add full range of years and logic to determine age #1

Closed delta1 closed 5 years ago

delta1 commented 5 years ago

Howzit!

Thanks for the repo - I added the missing years and some logic to determine which century we should be in..

Obviously there's an assumption that anything from 0 - 19 (current year) should be in the 2000s instead of 1900s (SA ID numbers are ambiguous)

Hope that helps - you can check out my fork for other improvements/changes if you like

Cheers

Chris927 commented 5 years ago

Hi Byron

Thanks for looking into this! It makes perfect sense to care about ID numbers of those born since 2000.

I'd be happy to accept a pull request, if you'd limit the changes to what is necessary to implement just that (and removed changes related to styling and links).

Furthermore, now that I think about it, it would be better to explicitly state the ambiguity of the year digits in an ID number in the options... how about this:

Assuming we are in 2019, then

Makes sense?

If you happy to do this, please update the pull request, otherwise you could create an issue, and I'll do it at some point.

delta1 commented 5 years ago

Sorry I actually made the PR before I did the styling changes - so you could just cherry-pick that commit if you want to.

I just needed this for something I was working on, won't have time to make any updates soon - sorry about that!

Chris927 commented 5 years ago

No problem, thanks anyway!