diff options
author | Paul Ganssle <paul@ganssle.io> | 2017-12-05 16:32:51 +0000 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2017-12-06 12:44:00 +0000 |
commit | 5bf007f68a67c9fdcb0e4f0b668d4b39a7f70170 (patch) | |
tree | a40412600b1aaed1fc75d46ff221c5824f8e285b /dateutil/parser | |
parent | afd05a4bcb8fe1c7a5e29f6d85c95ef048b41c2e (diff) | |
download | dateutil-5bf007f68a67c9fdcb0e4f0b668d4b39a7f70170.tar.gz |
Drop common_only option for initial API
Diffstat (limited to 'dateutil/parser')
-rw-r--r-- | dateutil/parser/isoparser.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/dateutil/parser/isoparser.py b/dateutil/parser/isoparser.py index 6a3d0c6..c2f91d5 100644 --- a/dateutil/parser/isoparser.py +++ b/dateutil/parser/isoparser.py @@ -3,7 +3,7 @@ This module offers a parser for ISO-8601 strings It is intended to support all valid date, time and datetime formats per the -ISO-8601 specification, with a stricter mode for the most common subset. +ISO-8601 specification. """ from datetime import datetime, timedelta, time, date import calendar @@ -61,7 +61,7 @@ class isoparser(object): self._default_year = datetime.now().year @_takes_ascii - def isoparse(self, dt_str, common_only=False): + def isoparse(self, dt_str): """ Parse an ISO-8601 datetime string into a :class:`datetime.datetime`. @@ -117,9 +117,6 @@ class isoparser(object): :param dt_str: A string or stream containing only an ISO-8601 datetime string - :param common_only: - If true, parsing the uncommon formats will throw an error. - :return: Returns a :class:`datetime.datetime` representing the string. Unspecified components default to their lowest value, with the @@ -130,10 +127,7 @@ class isoparser(object): non-leap-year default date), the default will be the last leap year to occur before the default year. """ - if common_only: - components, pos = self._parse_isodate_common(dt_str) - else: - components, pos = self._parse_isodate(dt_str) + components, pos = self._parse_isodate(dt_str) if len(dt_str) > pos: if dt_str[pos:pos + 1] == self._sep: |