fix numeric date parser pathological case
This commit is contained in:
parent
35a38bc2bd
commit
3d9d9e2851
@ -614,6 +614,8 @@ class DateParser(object):
|
|||||||
match = self._numeric.match(text)
|
match = self._numeric.match(text)
|
||||||
if match:
|
if match:
|
||||||
groups = match.groups()
|
groups = match.groups()
|
||||||
|
if groups == (None, None, None, None, None):
|
||||||
|
return Date.EMPTY
|
||||||
if self.ymd:
|
if self.ymd:
|
||||||
# '1789' and ymd: incomplete date
|
# '1789' and ymd: incomplete date
|
||||||
if groups[1] is None:
|
if groups[1] is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user