Update src/aki_prj23_transparenzregister/utils/data_extraction/unternehmensregister/transform.py

Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de>
This commit is contained in:
Tristan Nolde 2023-10-15 11:56:06 +02:00 committed by GitHub
parent d34a0ffeac
commit 15ace5382d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -377,7 +377,8 @@ def extract_date_from_string(value: str) -> str | None:
str | None: Date in ISO format, None if not found
"""
date_regex = [ # type: ignore
{"regex": r"\d{1,2}\.\d{1,2}\.\d{2,4}", "mapper": transform_date_to_iso},
{"regex": r"\d{1,2}\.\d{1,2}\.(19|20)?\d{2}", "mapper": transform_date_to_iso},
{"regex": r"(20|19)\d{2}-\d{1,2}-\d{1,2}", "mapper": None},
]