arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
484 stars 203 forks source link

Add 2020 decade Albania TIN #402

Closed Dj0ulo closed 1 year ago

Dj0ulo commented 1 year ago

The first letter of Albania TIN corresponds to the decade it was issued. (Source: https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Albania-TIN.pdf)

This commit adds 'M' to the regex in order to match TIN from this decade.

arthurdejong commented 1 year ago

Hi @Dj0ulo,

Thanks for pointing this out and providing the PR. I took this a little further and fixed it as a09a7ce. It turns out that the scope of the original implementation had some problems and the range we should accept is actually larger than the previous range implied.