stdnum.ee.ik¶
Isikukood (Estonian Personal ID number).
The number consists of 11 digits: the first indicates the gender and century the person was born in, the following 6 digits the birth date, followed by a 3 digit serial and a check digit.
More information:
>>> validate('36805280109')
'36805280109'
>>> validate('36805280108') # incorrect check digit
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> get_birth_date('36805280109')
datetime.date(1968, 5, 28)
- stdnum.ee.ik.calc_check_digit(number)¶
Calculate the check digit.
- stdnum.ee.ik.compact(number)¶
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
- stdnum.ee.ik.get_birth_date(number)¶
Split the date parts from the number and return the birth date.
- stdnum.ee.ik.get_gender(number)¶
Get the person’s birth gender (‘M’ or ‘F’).
- stdnum.ee.ik.is_valid(number)¶
Check if the number provided is valid. This checks the length, formatting, embedded date and check digit.
- stdnum.ee.ik.validate(number)¶
Check if the number provided is valid. This checks the length, formatting, embedded date and check digit.