Fixed a regular expression in the _parse_period_spec function of the period utility.
This commit is contained in:
parent
32c27d7c07
commit
fe77f87110
@ -498,7 +498,7 @@ def _parse_period_spec(text: str) \
|
||||
m = re.match(r"^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?-$", text)
|
||||
if m is not None:
|
||||
return __get_start(m[1], m[2], m[3]), None
|
||||
m = re.match(r"-^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$", text)
|
||||
m = re.match(r"-(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$", text)
|
||||
if m is not None:
|
||||
return None, __get_end(m[1], m[2], m[3])
|
||||
m = re.match(r"^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?-(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$", text)
|
||||
|
Loading…
Reference in New Issue
Block a user