1.0.5 • Published 11 months ago

numeric-personal-code-utils v1.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

Info about this package: RO - EN

EN (English)

  • This package provides a predefined algorithm for finding the control digit from a PIN ( Personal Identification Number ), the algorithm being transposed in the TypeScript programming language. It also provides a validator for the last digit of a PIN.

  • The software is licensed under the Apache-2.0 license. See the LICENSE file for more info. License.

  • What do the digits of a Personal Identification Number ( PIN ) represent? It uses the structure GYYMMDDCCNNNC ( 13 digits ). S represents the gender of the person. If the person was born before 2000, 1 represents Male and 2 Female. If the person was born after 2000, 1 and 2 will be replaced by 5 and 6. A represents the last two digits of the person's year of birth. L represents the month in which the person was born, Z, respectively, represents the day. J represents 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 range 001 - 999 and 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. C represents the control digit, calculated by an algorithm. This package provides 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 by 11. The remainder of the division is the control digit. If the remainder is 10, the control digit is 1.

RO (Romanian)

  • Acest package prevede un algoritm predefinit pentru aflarea cifrei de control dintr-un CNP ( Cod Numeric Personal ), algoritmul fiind transpus în limbajul de programare TypeScript. 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șierul LICENSE pentru mai multe detalii. Licență.

  • Ce reprezintă cifrele unui Cod Numeric Personal ( CNP ) ? Acesta se folosește de structura SAALLZZJJNNNC ( 13 cifre ). S reprezintă sexul persoanei. Dacă persoana a fost născută înainte de 2000, 1 reprezintă Bărbat, iar 2 Femeie. Dacă persoana a fost născută după 2000, 1 și 2 vor fi înlocuite de 5 și 6. A reprezintă ultimele două cifre din anul de naștere al persoanei. L reprezintă luna în care persoana s-a născut, Z, respectiv, reprezintă ziua. J reprezintă 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 intervalul 001 - 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. C reprezintă cifra de control, calculată printr-un algoritm. Acest package prevede 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 la 11. Restul împărțirii reprezintă cifra de control. În cazul în care restul este 10, cifra de control este 1.

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago