stdnum.be.nn¶
NN, NISS (Belgian national number).
The national number is a unique identifier of Belgian. The number consists of 11 digits.
More information:
https://fr.wikipedia.org/wiki/Numéro_de_registre_national
>>> compact('85.07.30-033 28')
'85073003328'
>>> validate('85 07 30 033 28')
'85073003328'
>>> validate('17 07 30 033 84')
'17073003384'
>>> validate('12345678901')
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> format('85073003328')
'85.07.30-033.28'
>>> get_birth_date('85.07.30-033 28')
datetime.date(1985, 7, 30)
- stdnum.be.nn.compact(number)¶
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.be.nn.format(number)¶
Reformat the number to the standard presentation format.
- stdnum.be.nn.get_birth_date(number)¶
Return the date of birth
- stdnum.be.nn.is_valid(number)¶
Check if the number is a valid National Number.
- stdnum.be.nn.validate(number)¶
Check if the number if a valid National Number.