fix parsing of dates
This commit is contained in:
parent
9bf7d618d8
commit
ed8551a415
1 changed files with 1 additions and 1 deletions
|
|
@ -202,7 +202,7 @@ class AccountsList(CragrBasePage):
|
||||||
matches = re.search('([012]?[0-9]|3[01])\s*/\s*(0?[1-9]|1[012])', string)
|
matches = re.search('([012]?[0-9]|3[01])\s*/\s*(0?[1-9]|1[012])', string)
|
||||||
if matches is None:
|
if matches is None:
|
||||||
return self.fallback_date()
|
return self.fallback_date()
|
||||||
return self.date_from_day_month(int(matches[1]), int(matches[2]))
|
return self.date_from_day_month(int(matches.group(1)), int(matches.group(2)))
|
||||||
|
|
||||||
def date_from_day_month(self, day, month):
|
def date_from_day_month(self, day, month):
|
||||||
today = date.today()
|
today = date.today()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue