Skip to content

Commit

Permalink
fix(date_translation_data/fr.py): add 'ago' to french relative parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
gutsytechster committed Dec 16, 2022
1 parent 9b6c15a commit 6d3f42e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dateparser/data/date_translation_data/fr.py
Expand Up @@ -445,7 +445,8 @@
"sentence_splitter_group": 1,
"ago": [
"il ya",
"il y a"
"il y a",
"ago"
],
"in": [
"dans",
Expand Down
Expand Up @@ -47,6 +47,7 @@ second:
ago:
- il ya
- il y a
- ago
in:
- dans
- en
Expand Down
1 change: 1 addition & 0 deletions tests/test_freshness_date_parser.py
Expand Up @@ -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'),
Expand Down

0 comments on commit 6d3f42e

Please sign in to comment.