This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// M11.js | |
/* | |
* Modules 11 control algorithm it's used | |
* Used by the danish goverment to validate CPR numbers (social security numbers). | |
* It works by having a number list and giving them each a weight from 2 to 7 then | |
* multiplying them to then divide the number with the mod (11 usually) | |
* to see if the reminder is 0. | |
* | |
* the modules operator (%) in javascript takes bad values. |