Commit a1f1d33d authored by Markus Ühlein's avatar Markus Ühlein

fixe bug bei manueller Datumseingabe

parent ea2e51da
......@@ -175,8 +175,31 @@ class Protokollskript:
"""get date from user input"""
dtmp = input("Datum ["+self.date+"]: ")
if dtmp != "":
return dtmp
return date
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]
def get_editor(self, editor):
"""get the editor to use from user input"""
......@@ -197,7 +220,11 @@ class Protokollskript:
# get data form user
self.sprecher = self.get_sprecher(self.sprecher)
self.protokollant = self.get_protokollant(self.protokollant)
self.date = self.get_date(self.date)
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.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