You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,9 +37,10 @@ Documentation is built automatically and can be found on
37
37
Features
38
38
========
39
39
40
-
* Generic parsing of dates in over 200 languages plus numerous formats in a language agnostic fashion.
40
+
* Generic parsing of dates in over 200 language locales plus numerous formats in a language agnostic fashion.
41
41
* Generic parsing of relative dates like: ``'1 min ago'``, ``'2 weeks ago'``, ``'3 months, 1 week and 1 day ago'``, ``'in 2 days'``, ``'tomorrow'``.
42
42
* Generic parsing of dates with time zones abbreviations or UTC offsets like: ``'August 14, 2015 EST'``, ``'July 4, 2013 PST'``, ``'21 July 2013 10:15 pm +0500'``.
43
+
* Date lookup in longer texts.
43
44
* Support for non-Gregorian calendar systems. See `Supported Calendars`_.
44
45
* Extensive test coverage.
45
46
@@ -218,6 +219,17 @@ You can also ignore parsing incomplete dates altogether by setting `STRICT_PARSI
218
219
For more on handling incomplete dates, please look at `Settings`_.
219
220
220
221
222
+
Search for Dates in Longer Chunks of Text
223
+
-----------------------------------------
224
+
225
+
You can extract dates from longer strings of text. They are returned as list of tuples with text chunk containing the date and parsed datetime object.
226
+
227
+
>>> from dateparser.search import search_dates
228
+
>>> search_dates("The client arrived to the office for the first time in March 3rd, 2004 and got serviced, after a couple of months, on May 6th 2004, the customer returned indicating a defect on the part")
229
+
[(u'in March 3rd, 2004 and', datetime.datetime(2004, 3, 3, 0, 0)),
230
+
(u'on May 6th 2004', datetime.datetime(2004, 5, 6, 0, 0))]
0 commit comments