Commit cf3fbe44 authored by Lorenz Steinert's avatar Lorenz Steinert

refractord code

parent a1f1d33d
......@@ -175,30 +175,12 @@ class Protokollskript:
"""get date from user input"""
dtmp = input("Datum ["+self.date+"]: ")
if dtmp != "":
tmp=''
day=''
mon=''
year=''
for i in dtmp:
if i!=".":
tmp=tmp+i
else:
if day=='':
day=tmp
tmp=''
else:
mon=tmp
tmp=''
year=tmp
tmp=''
if len(mon) < 2:
mon = "0"+mon
if len(day) < 2:
day = "0"+day
date = day+"."+mon+"."+year
return [dtmp, day, mon, year]
return [date, self.day, self.mon, self.year]
day, mon, year = dtmp.split('.')
if len(mon) < 2: mon = "0" + mon
if len(day) < 2: day = "0" + day
date = day + "." + mon + "." + year
return date, day, mon, year
return date, self.day, self.mon, self.year
def get_editor(self, editor):
......@@ -220,11 +202,7 @@ class Protokollskript:
# get data form user
self.sprecher = self.get_sprecher(self.sprecher)
self.protokollant = self.get_protokollant(self.protokollant)
date_new = self.get_date(self.date)
self.date=date_new[0]
self.day=date_new[1]
self.mon=date_new[2]
self.year=date_new[3]
self.date, self.day, self.mon, self.year = self.get_date(self.date)
self.editor = self.get_editor(self.editor)
outdir = "../" + self.year + "/fsr_physik_sitzung_" + self.year + "-" \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment