mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
2019 logbook error fix
This commit is contained in:
parent
278a84a485
commit
91c9cf0c31
@ -182,7 +182,7 @@ def ParseDate(tripdate, year):
|
||||
message = f" ! - Bad date (year) in logbook: {tripdate} - {year}"
|
||||
DataIssue.objects.create(parser='logbooks', message=message)
|
||||
logdataissues["tripdate"]=message
|
||||
return datetime.date('1970', '01', '01')
|
||||
return datetime.date(1970, 1, 1)
|
||||
else:
|
||||
year, month, day = int(mdatestandard.group(1)), int(mdatestandard.group(2)), int(mdatestandard.group(3))
|
||||
elif mdategoof:
|
||||
@ -190,7 +190,7 @@ def ParseDate(tripdate, year):
|
||||
message = " ! - Bad date mdategoof.group(3) in logbook: " + tripdate + " - " + mdategoof.group(3)
|
||||
DataIssue.objects.create(parser='logbooks', message=message)
|
||||
logdataissues["tripdate"]=message
|
||||
return date('1970', '01', '01')
|
||||
return datetime.date(1970, 1, 1)
|
||||
else:
|
||||
yadd = int(year[:2]) * 100
|
||||
day, month, year = int(mdategoof.group(1)), int(mdategoof.group(2)), int(mdategoof.group(4)) + yadd
|
||||
@ -204,7 +204,7 @@ def ParseDate(tripdate, year):
|
||||
message = f" ! - Failed to parse date in logbook: {tripdate} - {year}"
|
||||
DataIssue.objects.create(parser='logbooks', message=message)
|
||||
logdataissues["tripdate"]=message
|
||||
return date('1970', '01', '01')
|
||||
return datetime.date(1970, 1, 1)
|
||||
|
||||
# (2006 - not any more), 2008 - 2009
|
||||
def Parselogwikitxt(year, expedition, txt):
|
||||
|
Loading…
Reference in New Issue
Block a user