In Finland, the social security number ("Sosiaaliturvatunnus", or SOTU), often referred to just as "person identifier" ("Henkilötunnus"), is defined in Väestötietoasetus, 2 § (Säädöskokoelma 886/1993, muutettu 84/1997).
It is formed using a rather simple formula. The social security number always has following parts:
DDMMYYSPPPC
Where:
- DDMMYY is the day the person was born (using last two digits of the year, of course),
- S is the separator,
- PPP is the person number, and
- C is the checksum.
The separator is
- + for people born in 1800s,
- - for people born in 1900s, and
- A for people born in 2000s.
I guess (note: not know) the only really huge Y2K problem in Finland was that some programs may have assumed the separator was always '-'...
The person number is always even for females and odd for males. (Yes, this limits the "legal" maximum population growth to 999 per day... this is a small country, you know.)
The checksum is calculated thus:
- Take the birth date and person number, and join them to one 9-digit number a.
- Divide by 31 and take the remainder: n = a % 31.
- Pick the nth letter from string "0123456789ABCDEFHJKLMNPRSTUVWXY"
Information taken from sfnet.atk.ohjelmointi FAQ, condensed a bit...