fix(normalizer): don't convert plausible typo years as Excel serials
This commit is contained in:
@@ -52,3 +52,10 @@ def test_parse_year_unresolvable_truncated():
|
||||
def test_parse_year_typo_year():
|
||||
# "4.3.1023" — year 1023 outside 1500-2100 guard — returns None
|
||||
assert persons_tree._parse_year("4.3.1023") is None
|
||||
|
||||
|
||||
def test_parse_year_bare_out_of_range_year_is_none():
|
||||
# "1023" is a plausible typo for "1923" but is NOT an Excel serial.
|
||||
# parse_date("1023") parses it as year 1023 (out of 1700-2100 guard).
|
||||
# The serial branch must NOT re-interpret it as a serial.
|
||||
assert persons_tree._parse_year("1023") is None
|
||||
|
||||
Reference in New Issue
Block a user