Century in swedish personal identity number by jongotlin · Pull Request #964 · FakerPHP/Faker · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Century in swedish personal identity number #964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: 2.0
Choose a base branch
from

Conversation

jongotlin
Copy link

@jongotlin jongotlin commented May 8, 2025

What is the reason for this PR?

Sometimes you need the full identity number (with century). For example when working with Swedish Bank ID.

  • A new feature
  • Fixed an issue (resolve #ID)

Author's checklist

Review checklist

  • All checks have passed
  • Changes are added to the CHANGELOG.md
  • Changes are approved by maintainer

@chogberg
Copy link

chogberg commented May 15, 2025

I'm not sure if it matters, but the way to indicate which century a personal number format belongs to is a + sign. Most systems do not use this format, though. A person with a personal number 25XXXX+XXXX is born in 1925, and 25XXXX-XXXX is born in 2025. This is stated in §18 in folkbokföringslagen. I have no clue how that will sort 21XX, but maybe they did not think it would last that far.

Edit: After a quick re-read, it is stated that if it is not cumbersome, the year should be stored with 4 digits. This is an amendment to the law which was enacted in 2009. Since the + format is stated above and still valid, the amendment just adds that the format for digits should be stored if not cumbersome seems to be 1925XXX+XXXX, which I have never seen someone use.

https://www4.skatteverket.se/rattsligvagledning/28831.html?date=2025-01-01

@jongotlin
Copy link
Author

I haven't seen any implementation using +-. Plus sign doesn't indicate century but if the person is 100+ years old. Sure it can be added as an optional parameter here but since no one is using it lets wait until it's requested.

@chogberg
Copy link

I haven't seen any implementation using +-. Plus sign doesn't indicate century but if the person is 100+ years old. Sure it can be added as an optional parameter here but since no one is using it lets wait until it's requested.

Sounds great to wait. I have not seen the +/- sign usage either, and, strangely, it seems to be kept even when (since the law does not say otherwise) four digits are used for the year. Sure, the +/- is not used explicitly for century, but the effect is that it differentiates between the current century and the former century, or as you say, that the person is 100 or more years old

Copy link

stale bot commented Jun 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 1 week if no further activity occurs. Thank you for your contributions.

@jongotlin
Copy link
Author

Any chance this can get merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.