stdnum.au.abn

ABN (Australian Business Number).

The Australian Business Number (ABN) is an identifier issued to entities registered in the Australian Business Register (ABR). The number consists of 11 digits of which the first two are check digits.

More information:

>>> validate('83 914 571 673')
'83914571673'
>>> validate('99 999 999 999')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('51824753556')
'51 824 753 556'
stdnum.au.abn.calc_check_digits(number)

Calculate the check digits that should be prepended to make the number valid.

stdnum.au.abn.compact(number)

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

stdnum.au.abn.format(number)

Reformat the number to the standard presentation format.

stdnum.au.abn.is_valid(number)

Check if the number is a valid ABN.

stdnum.au.abn.validate(number)

Check if the number is a valid ABN. This checks the length, formatting and check digit.