From 1c97d3da21917c92c3aeabb768c888161bb4a7ab Mon Sep 17 00:00:00 2001 From: Prashant Sharma Date: Fri, 16 Dec 2022 17:42:25 +0530 Subject: [PATCH] fix(date_translation_data/fr.py): add 'ago' to french relative parsing --- dateparser/data/date_translation_data/fr.py | 3 ++- tests/test_freshness_date_parser.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dateparser/data/date_translation_data/fr.py b/dateparser/data/date_translation_data/fr.py index ee7f4c5ba..1ae4b591f 100644 --- a/dateparser/data/date_translation_data/fr.py +++ b/dateparser/data/date_translation_data/fr.py @@ -445,7 +445,8 @@ "sentence_splitter_group": 1, "ago": [ "il ya", - "il y a" + "il y a", + "ago" ], "in": [ "dans", diff --git a/tests/test_freshness_date_parser.py b/tests/test_freshness_date_parser.py index 13193082c..fc7149f5f 100644 --- a/tests/test_freshness_date_parser.py +++ b/tests/test_freshness_date_parser.py @@ -136,6 +136,7 @@ def test_relative_past_dates_with_time_as_period(self, date_string, ago, period) ago={'years': 1, 'months': 1, 'weeks': 1, 'days': 1, 'hours': 1, 'minutes': 1}, period='day'), param('Il y a 40 min', ago={'minutes': 40}, period='day'), + param('4 heures ago', ago={'hours': 4}, period='day'), # German dates param('Heute', ago={'days': 0}, period='day'),