koblas / stdnum-js

A JavaScript library to provide functions to handle, parse and validate standard numbers.
MIT License
39 stars 26 forks source link

Spain Social Security Number #54

Closed teebu closed 1 year ago

teebu commented 1 year ago

https://learn.microsoft.com/en-us/microsoft-365/compliance/sit-defn-spain-social-security-number?view=o365-worldwide

The format is: 11 or 12 digits, two digits (origin) followed by 7 or 8, followed by 2 checksum digits.

aa/bbbbbbbb/cc or aa/bbbbbbb/cc or 11/12 digits like 111111111111

The only reference I managed to find about checksum (mod 97) is here 6.2 Social Security Number on page 11-12. https://cis.ier.hit-u.ac.jp/English/society/conference1001/delgado-paper.pdf

After some more digging I found this: https://www.grupoalquerque.es/ferias/2012/archivos/digitos/codigo_seguridad_social.pdf

koblas commented 1 year ago

Just FYI - still looking into this.

teebu commented 1 year ago

I've accepted their mod approach from the 2012 archived pdf.