Package is done.
This commit is contained in:
parent
46d1e5101e
commit
5ab4f2514e
6
egon.py
6
egon.py
|
@ -734,24 +734,18 @@ class AssignmentDlg(QDialog):
|
|||
dateTime = dateString.split()
|
||||
dateList = dateTime[0].split('.')
|
||||
timeList = dateTime[1].split(':')
|
||||
print dateList, timeList
|
||||
|
||||
if dateList[1] > '13':
|
||||
dateMessage = QErrorMessage()
|
||||
dateMessage.showMessage(QString(self.trUtf8("The month is not valid. Please enter a valid date.")))
|
||||
print dateList[1]
|
||||
elif dateList[0] > '31':
|
||||
dateMessage = QErrorMessage()
|
||||
dateMessage.showMessage(QString(self.trUtf8("The day is not valid. Please enter a valid date.")))
|
||||
print dateList[0]
|
||||
elif timeList[0] > '23':
|
||||
dateMessage = QErrorMessage()
|
||||
dateMessage.showMessage(QString(self.trUtf8("The hour is not valid. Please enter a valid time.")))
|
||||
print timeList[0]
|
||||
elif timeList[1] > '59':
|
||||
dateMessage = QErrorMessage()
|
||||
dateMessage.showMessage(QString(self.trUtf8("The minutes are not valid. Please enter a valid time.")))
|
||||
print timeList[1]
|
||||
else:
|
||||
try:
|
||||
date = QDate(string.atoi(dateList[2]), string.atoi(dateList[1]), string.atoi(dateList[0]))
|
||||
|
|
Reference in New Issue