We still have the 41-52 and 61-72 ranges unused for the 22rd and 23rd centuries, and then we can re-use 80 (since it's extremely unlikely for anybody from the 19th century to survive that long). Now that's some long-term planning.
However, it's often said that no plan survives contact with reality, and that's also unfortunately true for this system. All that future proofing, and now it turns out that some assumptions thought inviolable, namely that people are either strictly male or strictly female and never change their gender, aren't so inviolable after all. We use a single bit to encode gender (it's the evenness or oddness of a particular digit in the number), and we also assume that PESEL numbers never change, to the point of using them as primary keys in some databases. The latter is causing trouble right now, and the former is inevitably going to.
National identification numbers should be opaque; just a number unique in its own domain, but encoding nothing¹.
1: An exception is to have a certain ranges of those numbers designated for testing, so you can test stuff without ever accidentally using a real one.
Whoever processes the Swedish Identity Number, even if they use YYYYMMDD-SSSC _or_ YYMMDD-SSSC, wouldn't break processing with YYYYMMDD+SSSC or YYMMDD+SSSC - as the '+' is a standardised "give away" as to the age of the person (making the 4-digit YYYY less desirable for processing).
[1] - https://www.skatteverket.se/servicelankar/otherlanguages/ine...
Edit: I'd just let BankID handle the validation and store the two-digit year.[2]
[1] - https://en.wikipedia.org/wiki/Personal_identity_number_(Swed...
Australian birth certificates do a similar thing .. and Polish birth certificates and passports for those born oversees are supposed (see gov.pl site) to reproduce exactly what is on the foreign birth certificates and passports.
As the GP comment notes, supposedly invarient assumptions can bite programmers in the ass.
> I moved to the UK five years ago. My birth certificate and passport list my sex as Nonbinary/X. My application for legal gender recognition was granted two years ago, but then things got weird... I had to take the government to court.
For some reason, the government is refusing to issue the documents they've granted the applications for. Per https://www.leighday.co.uk/news/news/2024-news/nonbinary-us-..., the High Court has ruled that this is discriminatory, but that the government is allowed to discriminate against non-binary people. The case is due before the Court of Appeal at some point in the future.
Up-to-date info can be found at https://enby.org.uk/ (currently a GoFundMe redirect).
Polish doesn't really have this distinction, there's one word we use for both, and more descriptive terms are needed if you actually need to be specific.
Edit: apparently there's an optional section in the chip (data group 11 or DG11) that allows for longer-form data than the ancient machine-readable format, including non-latin letters in the name and a birthdate including the century. I don't know how widely used that is though.
Simultaneously the most and least surprising situation.
Deal with this all the time working with an old system written in COBOL. Current system was patched with a db column for century.
The problem that really flies under the radar though: https://en.wikipedia.org/wiki/Year_2038_problem