For a Swedish Personnummer (social security number), the last digit is a Luhn-checksum. The second last digit is odd for a person with male legal gender and even for a person with female legal gender.
You can read about it here:
https://skatteverket.se/privat/folkbokforing/personnummer.4.3810a01c150939e893f18c29.html
The implementation in ExtensionsForSweden.cs was implemented the other way around for male/female.
This PR fixes the gender digit and the corresponding unit tests.
For a Swedish Personnummer (social security number), the last digit is a Luhn-checksum. The second last digit is odd for a person with male legal gender and even for a person with female legal gender. You can read about it here: https://skatteverket.se/privat/folkbokforing/personnummer.4.3810a01c150939e893f18c29.html The implementation in ExtensionsForSweden.cs was implemented the other way around for male/female. This PR fixes the gender digit and the corresponding unit tests.