It is recommended to store and process personnummer in 12 digit form (YYYYMMDDBBBC) to avoid ambiguity, since the 10 digit form with +/- depends on date of entry. Currently personnummer.ts accepts both forms, but can only output the 10 digit form, through format(). It would be nice to also be able to output the 12 digit form, for storage and processing.
It is recommended to store and process personnummer in 12 digit form (
YYYYMMDDBBBC
) to avoid ambiguity, since the 10 digit form with +/- depends on date of entry. Currently personnummer.ts accepts both forms, but can only output the 10 digit form, throughformat()
. It would be nice to also be able to output the 12 digit form, for storage and processing.