# stdnum.gr.amka

AMKA (Αριθμός Μητρώου Κοινωνικής Ασφάλισης, Greek social security number).

The Αριθμός Μητρώου Κοινωνικής Ασφάλισης (AMKA or Arithmos Mitroou Koinonikis Asfalisis) is the personal identifier that is used for social security purposes in Greece. The number consists of 11 digits and includes the person’s date of birth and gender.

More information:

- http://www.amka.gr/tieinai_en.html

    >>> validate('01013099997')
    '01013099997'
    >>> validate('01013099999')
    Traceback (most recent call last):
        ...
    InvalidChecksum: ...
    >>> get_birth_date('01013099997')
    datetime.date(1930, 1, 1)
    >>> get_gender('01013099997')
    'M'

`stdnum.gr.amka.``compact`(number)

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

`stdnum.gr.amka.``get_birth_date`(number)

  Split the date parts from the number and return the date of birth. Since only two digits are used for the year, the century may be incorrect.

`stdnum.gr.amka.``get_gender`(number)

  Get the gender (M/F) from the person’s AMKA.

`stdnum.gr.amka.``is_valid`(number)

  Check if the number is a valid AMKA.

`stdnum.gr.amka.``validate`(number)

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