Skip to content
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

swedish ssn cannot have format like XXXXXX-000X #1434

Merged
merged 5 commits into from
Nov 9, 2024

Conversation

TrueJacobG
Copy link
Contributor

@TrueJacobG TrueJacobG commented Nov 6, 2024

swedish ssn cannot have format like XXXXXX-000X, the end number part has to be between 001 and 999

explanation: https://www4.skatteverket.se/rattsligvagledning/edition/2024.5/330242.html#update_20240802105842

Information obtained with help of @Jakub-Pazio and @Johannestegner

Copy link
Collaborator

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.25%. Comparing base (1b19bdc) to head (aabf010).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1434      +/-   ##
============================================
+ Coverage     92.18%   92.25%   +0.06%     
- Complexity     3161     3165       +4     
============================================
  Files           320      320              
  Lines          6178     6181       +3     
  Branches        592      593       +1     
============================================
+ Hits           5695     5702       +7     
+ Misses          340      338       -2     
+ Partials        143      141       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asolntsev asolntsev self-requested a review November 9, 2024 01:24
Copy link
Collaborator

@asolntsev asolntsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TrueJacobG There is a way to generate non-"000" number without a loop:

    private String generateEndPart(BaseProviders f) {
        return "%03d".formatted(f.number().numberBetween(1, 1000));
    }

@TrueJacobG TrueJacobG requested a review from asolntsev November 9, 2024 07:29
@kingthorin kingthorin merged commit ff110bf into datafaker-net:main Nov 9, 2024
10 checks passed
@bodiam
Copy link
Contributor

bodiam commented Nov 9, 2024

Thanks @asolntsev , @kingthorin and of course @TrueJacobG for working on this together, nice improvement!

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

Successfully merging this pull request may close these issues.

5 participants