tirilane
/
egon
Archived
1
0
Fork 0

Package is done.

This commit is contained in:
Tiril Anette Langfeldt Rødland 2008-06-19 16:14:32 +00:00
parent 46d1e5101e
commit 5ab4f2514e
1 changed files with 0 additions and 6 deletions

View File

@ -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]))