Update app.py
Browse files
app.py
CHANGED
|
@@ -129,24 +129,14 @@ def extract_result(lst):
|
|
| 129 |
str_month="0"+str(month)
|
| 130 |
|
| 131 |
|
| 132 |
-
print("11111")
|
| 133 |
-
print(day-1)
|
| 134 |
-
print("2222")
|
| 135 |
-
# if lower(nationality)=="aus":
|
| 136 |
-
# print(type(day))
|
| 137 |
-
# print(day)
|
| 138 |
-
# print("nada")
|
| 139 |
-
|
| 140 |
-
print("sad check1")
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
# print((datetime.strptime(lst[x][1][5], '%y%m%d')).year)
|
| 144 |
-
print("check1")
|
| 145 |
issue_date=str(str_day)+"/"+str(str_month)+"/"+str(year)
|
| 146 |
except:
|
| 147 |
|
| 148 |
birth_date=lst[x][1][4]#datetime.strptime(lst[x][1][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 149 |
expiry_date=lst[x][1][5]#datetime.strptime(lst[x][1][5], '%y%m%d').strftime('%d/%m/%Y')
|
|
|
|
|
|
|
|
|
|
| 150 |
issue_date=expiry_date
|
| 151 |
print(type(expiry_date))
|
| 152 |
print("check2")
|
|
@@ -167,9 +157,24 @@ def extract_result(lst):
|
|
| 167 |
try:
|
| 168 |
birth_date=datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 169 |
expiry_date=datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
except:
|
| 174 |
birth_date=lst[x][4]#datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 175 |
expiry_date=lst[x][5]#datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|
|
|
|
| 129 |
str_month="0"+str(month)
|
| 130 |
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
issue_date=str(str_day)+"/"+str(str_month)+"/"+str(year)
|
| 133 |
except:
|
| 134 |
|
| 135 |
birth_date=lst[x][1][4]#datetime.strptime(lst[x][1][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 136 |
expiry_date=lst[x][1][5]#datetime.strptime(lst[x][1][5], '%y%m%d').strftime('%d/%m/%Y')
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
|
| 140 |
issue_date=expiry_date
|
| 141 |
print(type(expiry_date))
|
| 142 |
print("check2")
|
|
|
|
| 157 |
try:
|
| 158 |
birth_date=datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 159 |
expiry_date=datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|
| 160 |
+
year=datetime.strptime(lst[x][1][5], '%y%m%d').year
|
| 161 |
+
month=datetime.strptime(lst[x][1][5], '%y%m%d').month
|
| 162 |
+
day=datetime.strptime(lst[x][1][5], '%y%m%d').day
|
| 163 |
+
year-=10
|
| 164 |
+
day-=1
|
| 165 |
+
str_day=day
|
| 166 |
+
str_month=month
|
| 167 |
+
if len(str(day))==1:
|
| 168 |
+
str_day="0"+str(day)
|
| 169 |
+
|
| 170 |
+
if len(str(month))==1:
|
| 171 |
+
str_month="0"+str(month)
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
issue_date=str(str_day)+"/"+str(str_month)+"/"+str(year)
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
|
| 178 |
except:
|
| 179 |
birth_date=lst[x][4]#datetime.strptime(lst[x][4], '%y%m%d').strftime('%d/%m/%Y')
|
| 180 |
expiry_date=lst[x][5]#datetime.strptime(lst[x][5], '%y%m%d').strftime('%d/%m/%Y')
|