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: docs/introduction.rst
+29-22
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,7 @@ Relative Dates
74
74
75
75
.. note:: Testing above code might return different values for you depending on your environment's current date and time.
76
76
77
-
.. note:: Support for relative dates in future needs a lot of improvement, we look forward to community's contribution to get better on that part. See ":ref:`contributing`".
78
-
77
+
.. note:: For `Finnish` language, please specify ``settings={'SKIP_TOKENS': []}`` to correctly parse relative dates.
79
78
80
79
OOTB Language Based Date Order Preference
81
80
-----------------------------------------
@@ -86,13 +85,12 @@ OOTB Language Based Date Order Preference
86
85
>>> parse('le 02-03-2016') # detects french, uses DMY date order
87
86
datetime.datetime(2016, 3, 2, 0, 0)
88
87
89
-
.. note:: Ordering is not locale based, that's why do not expect `DMY` order for UK/Australia English. You can specify date order in that case as follows using `settings`:
88
+
.. note:: Ordering is not locale based, that's why do not expect `DMY` order for UK/Australia English. You can specify date order in that case as follows using :ref:`settings`:
.. note:: In case, when timezone is present both in string and also specified using `settings`, string is parsed into tzaware representation and then converted to timezone specified in `settings`.
152
+
.. note:: In case, when timezone is present both in string and also specified using :ref:`settings`, string is parsed into tzaware representation and then converted to timezone specified in :ref:`settings`.
For more on handling incomplete dates, please look at Settings.
187
+
For more on handling incomplete dates, please look at :ref:`settings`.
190
188
191
189
192
190
Search for Dates in Longer Chunks of Text
193
191
-----------------------------------------
194
192
193
+
.. warning:: Support for searching dates is really limited and needs a lot of improvement, we look forward to community's contribution to get better on that part. See ":ref:`contributing`".
194
+
195
+
195
196
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.
196
197
198
+
197
199
.. automodule:: dateparser.search
198
200
:members: search_dates
199
201
202
+
203
+
Advanced Usage
204
+
==============
205
+
If you need more control over what is being parser check the :ref:`settings` section as well as the :ref:`using-datedataparser` section.
206
+
207
+
200
208
Dependencies
201
209
============
202
210
@@ -221,26 +229,25 @@ You can check the supported locales by visiting the ":ref:`supported-locales`" s
221
229
222
230
Supported Calendars
223
231
===================
224
-
* Gregorian calendar.
225
232
226
-
* Persian Jalali calendar. For more information, refer to `Persian Jalali Calendar <https://en.wikipedia.org/wiki/Iranian_calendars#Zoroastrian_calendar>`_.
233
+
Apart from the Georgian calendar, `dateparser` supports the `Persian Jalali calendar` and the `Hijri/Islami calendar`
234
+
235
+
To be able to use them you need to install the `calendar` extra by typing:
236
+
237
+
pip install dateparser[calendars]
238
+
239
+
240
+
* Example using the `Persian Jalali calendar`. For more information, refer to `Persian Jalali Calendar <https://en.wikipedia.org/wiki/Iranian_calendars#Zoroastrian_calendar>`_.
227
241
228
242
>>> from dateparser.calendars.jalali import JalaliCalendar
229
243
>>> JalaliCalendar('جمعه سی ام اسفند ۱۳۸۷').get_date()
0 commit comments