Last active
January 16, 2020 04:30
-
-
Save dungsaga/7828bb041e10e671ebea879ed80a7e14 to your computer and use it in GitHub Desktop.
Calculate NIR for French user at http://marlot.org/util/calcul-de-la-cle-nir.php
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
// use the web page at http://marlot.org/util/calcul-de-la-cle-nir.php | |
// when you input the data, it will calculate the check digits (Clé de contrôle) | |
// ref: https://en.wikipedia.org/wiki/INSEE_code | |
// run this in console to get the NIR string: | |
v=ids=>ids.split(',').map(id=>(e=document.getElementById(id),e.value||e.textContent)).join(' '); | |
v('sexe,annee,mois,dept,commune,ordre,cle'); | |
// or, patch function CalculerCleNir in http://marlot.org/util/js/global.js | |
// line 149: cle.innerHTML=calculCle; | |
cle.innerHTML=numero+calculCle; | |
// we will see the NIR string in the web page everytime the input was changed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment