aboutsummaryrefslogtreecommitdiff
path: root/dateutil/parser/_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'dateutil/parser/_parser.py')
-rw-r--r--dateutil/parser/_parser.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py
index a15624c..f5b5e9d 100644
--- a/dateutil/parser/_parser.py
+++ b/dateutil/parser/_parser.py
@@ -326,19 +326,17 @@ class parserinfo(object):
return name.lower() in self._jump
def weekday(self, name):
- if len(name) >= min(len(n) for n in self._weekdays.keys()):
- try:
- return self._weekdays[name.lower()]
- except KeyError:
- pass
+ try:
+ return self._weekdays[name.lower()]
+ except KeyError:
+ pass
return None
def month(self, name):
- if len(name) >= min(len(n) for n in self._months.keys()):
- try:
- return self._months[name.lower()] + 1
- except KeyError:
- pass
+ try:
+ return self._months[name.lower()] + 1
+ except KeyError:
+ pass
return None
def hms(self, name):