summaryrefslogtreecommitdiff
path: root/dateutil/parser
diff options
context:
space:
mode:
authorPaul Ganssle <paul@ganssle.io>2018-03-10 16:20:02 -0500
committerPaul Ganssle <paul@ganssle.io>2018-03-10 18:05:53 -0500
commiteb701cf58c65f04486e4d1e37249df788a739a38 (patch)
tree4a065809ac610328da5fd1a6d9d58bd09cef9f05 /dateutil/parser
parentc75e4094a07b98742224008ae09ea40f9b19aa1a (diff)
downloaddateutil-git-eb701cf58c65f04486e4d1e37249df788a739a38.tar.gz
Improve isoparse limitations documentation
Diffstat (limited to 'dateutil/parser')
-rw-r--r--dateutil/parser/isoparser.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/dateutil/parser/isoparser.py b/dateutil/parser/isoparser.py
index 6ce9688..114e516 100644
--- a/dateutil/parser/isoparser.py
+++ b/dateutil/parser/isoparser.py
@@ -57,7 +57,8 @@ class isoparser(object):
An ISO-8601 datetime string consists of a date portion, followed
optionally by a time portion - the date and time portions are separated
by a single character separator, which is ``T`` in the official
- standard.
+ standard. Incomplete date formats (such as ``YYYY-MM``) may *not* be
+ combined with a time portion.
Supported date formats are:
@@ -108,6 +109,16 @@ class isoparser(object):
:return:
Returns a :class:`datetime.datetime` representing the string.
Unspecified components default to their lowest value.
+
+ .. warning::
+
+ As of version 2.7.0, the strictness of the parser should not be
+ considered a stable part of the contract. Any valid ISO-8601 string
+ that parses correctly with the default settings will continue to
+ parse correctly in future versions, but invalid strings that
+ currently fail (e.g. ``2017-01-01T00:00+00:00:00``) are not
+ guaranteed to continue failing in future versions if they encode
+ a valid date.
"""
components, pos = self._parse_isodate(dt_str)