stdnum.me.pib

PIB (Poreski Identifikacioni Broj, Montenegro tax number).

This number consists of 8 digits.

More information:

>>> validate('02655284')
'02655284'
>>> validate('02655283')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('02655284')
'02655284'
stdnum.me.pib.calc_check_digit(number)

Calculate the check digit for the number.

stdnum.me.pib.compact(number)

Convert the number to the minimal representation.

This strips the number of any valid separators and removes surrounding whitespace.

stdnum.me.pib.format(number)

Reformat the number to the standard presentation format.

stdnum.me.pib.is_valid(number)

Check if the number is a valid Montenegro PIB number.

stdnum.me.pib.validate(number)

Check if the number is a valid Montenegro PIB number.