-
Notifications
You must be signed in to change notification settings - Fork 178
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
Added support for generating Latvian id number #1490
Conversation
cbxp
commented
Jan 27, 2025
•
edited by asolntsev
Loading
edited by asolntsev
- We support two formats: old (before 01.07.2017) and new (since 01.07.2017)
- For generating invalid ID numbers, we use only the old format (for simplicity)
-) we support two formats: old (before 01.07.2017) and new -) Only old format of the id number is used for invalid numbers
PR Summary
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1490 +/- ##
============================================
- Coverage 92.45% 92.41% -0.05%
- Complexity 3255 3265 +10
============================================
Files 324 325 +1
Lines 6387 6417 +30
Branches 623 625 +2
============================================
+ Hits 5905 5930 +25
Misses 336 336
- Partials 146 151 +5 ☔ View full report in Codecov by Sentry. |
case 18 -> 0; | ||
case 19 -> 1; | ||
case 20 -> 2; | ||
default -> throw new IllegalStateException("Too far in future: " + birthYear); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: i guess in case of year 1700 it will fail with Too far in future: 1700
which doesn't sound like true
may be something like out of allowed range [1800, 2100) would fit better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, error message improved.