stdnum.al.nipt

NIPT, NUIS (Numri i Identifikimit për Personin e Tatueshëm, Albanian tax number).

The Albanian NIPT is a 10-digit number with the first and last character being letters. The number is assigned to individuals and organisations for tax purposes.

The first letter indicates the decade the number was assigned or date birth date for individuals, followed by a digit for the year. The next two digits contain the month (and gender for individuals and region for organisations) followed by two digits for the day of the month. The remainder is a serial followed by a check letter (check digit algorithm unknown).

More information:

>>> validate('AL J 91402501 L')
'J91402501L'
>>> validate('K22218003V')
'K22218003V'
>>> validate('(AL) J 91402501')
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> validate('Z 22218003 V')
Traceback (most recent call last):
    ...
InvalidFormat: ...
stdnum.al.nipt.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.al.nipt.is_valid(number)

Check if the number is a valid VAT number.

stdnum.al.nipt.validate(number)

Check if the number is a valid VAT number. This checks the length and formatting.