module FFaker::SSNSE

The Social Security number is a 12-digit number in the format: “YYYYDDMM-XXXX’

sv.wikipedia.org/wiki/Personnummer_i_Sverige

The 4 last digits (XXXX) are generated based on what region the person are born # in, the gender and the last one is a check digit using the luhn algorithm.

en.wikipedia.org/wiki/Luhn_algorithm

Usage: ssn(from: Time.local(1980, 2, 28),

to: Time.local(2000, 2, 28),
gender: :male)