Open mhdzumair opened 2 months ago
Fixed.
def parse_year_range(value: str) -> dict[str, int]:
pattern = re.compile(r'\d{4}')
year_values = pattern.findall(value)
if not year_values:
return {}
data = {"year": int(year_values[0])}
if len(year_values) > 1:
data["end_year"] = int(year_values[1])
return data
will push the commit into later PR
Fail to parse date for