8000 Simplify range checking in Norwegian birth numbers · ARteapartedelarte/python-stdnum@abda037 · GitHub
[go: up one dir, main page]

Skip to content

Commit abda037

Browse files
DimitriPapadopoulosarthurdejong
authored andcommitted
Simplify range checking in Norwegian birth numbers
LGTM alert: Test is always true See: https://lgtm.com/rules/900073/ Closes arthurdejong#270
1 parent c69b4f6 
E5DC
commit abda037

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdnum/no/fodselsnummer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ def get_birth_date(number):
9696
month -= 40
9797
if individual_digits < 500:
9898
year += 1900
99-
elif 500 <= individual_digits < 750 and year >= 54:
99+
elif individual_digits < 750 and year >= 54:
100100
year += 1800
101-
elif 500 <= individual_digits < 1000 and year < 40:
101+
elif individual_digits < 1000 and year < 40:
102102
year += 2000
103103
elif 900 <= individual_digits < 1000 and year >= 40:
104104
year += 1900

0 commit comments

Comments
 (0)
0