Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dateparser/data/date_translation_data/en.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@
"and",
"at",
"by",
"from",
"just",
"m",
"nd",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
skip: ["about", "ad", "and", "at", "by", "just", "m", "nd", "of", "on", "rd", "st", "th", "the"]
skip: ["about", "ad", "and", "at", "by", "from", "just", "m", "nd", "of", "on", "rd", "st", "th", "the"]
pertain: ["of"]

sentence_splitter_group : 1
Expand Down
5 changes: 5 additions & 0 deletions tests/test_freshness_date_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ def test_relative_past_dates_with_time_as_period(self, date_string, ago, period)
period="day",
),
param("just now", ago={"seconds": 0}, period="day"),
param('11 hours from now', in_future={'hours': 11}, period='hour'),
param('10 days from now', in_future={'days': 10}, period='day'),
param('9 weeks from now', in_future={'weeks': 9}, period='week'),
param('8 months from now', in_future={'months': 8}, period='month'),
param('7 years from now', in_future={'years': 7}, period='year'),
# Fix for #291, work till one to twelve only
param("nine hours ago", ago={"hours": 9}, period="day"),
param("three week ago", ago={"weeks": 3}, period="week"),
Expand Down