(For Italian friends)
CodiceFiscale extension obtains the Italian Tax Code from the data entered by the user.
CodiceFiscale extension has six methods: 1) get the CodiceFiscale 2) Check Code 3) Reverse Code 4Get Locality From Code 5) Get Code From Locality 6) Generate Barcode or QRCode frm CodiceFiscale
The CodiceFiscale is an identification code that every person who pays taxes in Italy must have.
It is calculated on the basis of specific algorithms. For the name and surname it is based on the consonants and on the length of it. For the year the last two digits are taken. There is a special table for the month.
For gender we use M for male and F for female. For the day for male it is the date marked, instead for female it must be increased by 40.
Then there are four identifying characters for the municipality of birth, consisting of a letter and three numbers. If a person was born abroad, the character is always z.
At the end there is a control character that makes the code unique, obtained on two tables, one for even characters, another for odd characters that assigns a value that is eventually divided by 26.
I was inspired by this link: