numeric-personal-code-utils v1.0.5
Info about this package: RO - EN
EN (English)
This
packageprovides a predefined algorithm for finding the control digit from a PIN (Personal Identification Number), the algorithm being transposed in theTypeScriptprogramming language. It also provides a validator for the last digit of a PIN.The software is licensed under the
Apache-2.0license. See theLICENSEfile for more info. License.What do the digits of a Personal Identification Number ( PIN ) represent? It uses the structure
GYYMMDDCCNNNC ( 13 digits ).Srepresents the gender of the person. If the person was born before 2000,1represents Male and2Female. If the person was born after 2000, 1 and 2 will be replaced by5and6.Arepresents the last two digits of the person's year of birth.Lrepresents the month in which the person was born,Z, respectively, represents the day.Jrepresents the code of the county ( sector, for Bucharest ) where the person was born or resides.N- After the county/sector code ( Bucharest ), there are 3 digits in the PIN that represent the person's unique code. They are in the range001 - 999and are distributed to the Population Registration offices s.a. a number in that range to be assigned to a single person on a single day.Crepresents the control digit, calculated by an algorithm. Thispackageprovides the algorithm mentioned above.How is the control digit found? Take each digit from the first 12 of the PIN and multiply it by the digit from the same position in the number
279146358279. The results are then added, and the sum is divided by11. The remainder of the division is the control digit. If the remainder is10, the control digit is1.
RO (Romanian)
Acest
packageprevede un algoritm predefinit pentru aflarea cifrei de control dintr-un CNP (Cod Numeric Personal), algoritmul fiind transpus în limbajul de programareTypeScript. De asemenea, acesta prevede și un validator pentru ultima cifră a CNP-ului.Software-ul este licențiat sub licența
Apache-2.0. Vezi fișierulLICENSEpentru mai multe detalii. Licență.Ce reprezintă cifrele unui Cod Numeric Personal ( CNP ) ? Acesta se folosește de structura
SAALLZZJJNNNC ( 13 cifre ).Sreprezintă sexul persoanei. Dacă persoana a fost născută înainte de 2000,1reprezintă Bărbat, iar2Femeie. Dacă persoana a fost născută după 2000, 1 și 2 vor fi înlocuite de5și6.Areprezintă ultimele două cifre din anul de naștere al persoanei.Lreprezintă luna în care persoana s-a născut,Z, respectiv, reprezintă ziua.Jreprezintă codul județului ( sectorului, pentru București ) unde persoana s-a născut sau are reședința.N- După codul județului / Sectorului ( București ), în CNP se află 3 cifre care reprezintă codul unic al persoanei. Se află în intervalul001 - 999și se împart birourilor de Evidență a Populației a.î. un număr din acel interval să fie alocat unei singure persoane într-o singură zi.Creprezintă cifra de control, calculată printr-un algoritm. Acestpackageprevede algoritmul menționat mai sus.Cum se află cifra de control? Se ia fiecare cifră din primele 12 ale CNP-ului și se înmulțește cu cifra de pe aceeași poziție din numărul
279146358279. Rezultatele sunt apoi adunate, iar suma se împarte la11. Restul împărțirii reprezintă cifra de control. În cazul în care restul este10, cifra de control este1.