Skip to content

Commit

Permalink
Fix: date regex correction
Browse files Browse the repository at this point in the history
  • Loading branch information
HemanthM005 committed Nov 12, 2024
1 parent eb92bd5 commit 35498f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/utils/column_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ async def find_datetime_columns(columns: set):
month_pattern = re.compile(
r".*({})".format(datetime_settings.MONTH_KEYWORD)
)
date_pattern = re.compile(r".*({})".format(datetime_settings.DATE_KEYWORD))
date_pattern = re.compile(
r"^.*(?:^|_){}s?(?:_|$)|^.*(?:^|_){}(?:_|$)".format(
datetime_settings.DATE_KEYWORD, datetime_settings.DATE_KEYWORD
)
)

fiscal_year_columns, columns = extract_pattern_from_columns(
columns, non_cal_year_pattern
Expand Down

0 comments on commit 35498f3

Please sign in to comment.