From 5bf007f68a67c9fdcb0e4f0b668d4b39a7f70170 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 5 Dec 2017 16:32:51 +0000 Subject: Drop common_only option for initial API --- dateutil/parser/isoparser.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'dateutil/parser') 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: -- cgit v1.2.3