aboutsummaryrefslogtreecommitdiff
path: root/docs/examples.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples.rst')
-rw-r--r--docs/examples.rst15
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/examples.rst b/docs/examples.rst
index 8ca6a87..21270ca 100644
--- a/docs/examples.rst
+++ b/docs/examples.rst
@@ -138,7 +138,7 @@ Next wednesday, but not today.
datetime.date(2003, 9, 24)
Following
-[http://www.cl.cam.ac.uk/~mgk25/iso-time.html ISO year week number notation]
+`ISO year week number notation <https://www.cl.cam.ac.uk/~mgk25/iso-time.html>`_
find the first day of the 15th week of 1997.
.. doctest:: relativedelta
@@ -1190,6 +1190,19 @@ Other random formats:
datetime.datetime(1990, 6, 13, 5, 50)
+Override parserinfo with a custom parserinfo
+
+.. doctest:: tz
+
+ >>> from dateutil.parser import parse, parserinfo
+ >>> class CustomParserInfo(parserinfo):
+ ... # e.g. edit a property of parserinfo to allow a custom 12 hour format
+ ... AMPM = [("am", "a", "xm"), ("pm", "p")]
+ >>> parse('2018-06-08 12:06:58 XM', parserinfo=CustomParserInfo())
+ datetime.datetime(2018, 6, 8, 0, 6, 58)
+
+
+
tzutc examples
--------------