two logic bugs in transform.py that corrupt date-range parsing and timeline calculations for candidate work history
Date Range Loss for Single Start Dates: In transform_work_experience, when a candidate has a valid startDate (like "Jan 2021") and endDate (like "Dec 2022") parsed from the resume, because startDate contains a month name, it goes through parse_date_range("Jan 2021"). This returns ("Jan 2021", None). The caller then unconditionally overwrites end_date = None, which erases the candidate's actual job end date.
Spaced Date Range Corruption: When the LLM extracts a date range containing spaces around the hyphen (e.g. "Jan 2021 - Mar 2022"), parse_date_range splits the string by spaces into five parts. Since the first part ("Jan") does not contain a hyphen, it falls to the else block and incorrectly combines "Jan" with the end year "2022", returning ("Jan 2022", None).
two logic bugs in transform.py that corrupt date-range parsing and timeline calculations for candidate work history
Date Range Loss for Single Start Dates: In transform_work_experience, when a candidate has a valid startDate (like "Jan 2021") and endDate (like "Dec 2022") parsed from the resume, because startDate contains a month name, it goes through parse_date_range("Jan 2021"). This returns ("Jan 2021", None). The caller then unconditionally overwrites end_date = None, which erases the candidate's actual job end date.
Spaced Date Range Corruption: When the LLM extracts a date range containing spaces around the hyphen (e.g. "Jan 2021 - Mar 2022"), parse_date_range splits the string by spaces into five parts. Since the first part ("Jan") does not contain a hyphen, it falls to the else block and incorrectly combines "Jan" with the end year "2022", returning ("Jan 2022", None).