swedish ssn cannot have format like XXXXXX-000X#1434
Merged
kingthorin merged 5 commits intodatafaker-net:mainfrom Nov 9, 2024
Merged
swedish ssn cannot have format like XXXXXX-000X#1434kingthorin merged 5 commits intodatafaker-net:mainfrom
kingthorin merged 5 commits intodatafaker-net:mainfrom
Conversation
…to be between 001 and 999
kingthorin
reviewed
Nov 6, 2024
asolntsev
reviewed
Nov 6, 2024
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ 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. |
kingthorin
reviewed
Nov 7, 2024
kingthorin
approved these changes
Nov 7, 2024
asolntsev
requested changes
Nov 9, 2024
Collaborator
asolntsev
left a comment
There was a problem hiding this comment.
@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));
}
asolntsev
approved these changes
Nov 9, 2024
Contributor
|
Thanks @asolntsev , @kingthorin and of course @TrueJacobG for working on this together, nice improvement! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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