in gui/mozregui/wizard.py [0:0]
def validatePage(self):
start, end = self.get_start(), self.get_end()
if isinstance(start, str) or isinstance(end, str):
# do not check revisions
return True
try:
start_date = to_datetime(start)
end_date = to_datetime(end)
except DateFormatError as exc:
QMessageBox.critical(self, "Error", str(exc))
return False
current = datetime.datetime.now()
if start_date < end_date:
if end_date <= current:
return True
else:
QMessageBox.critical(self, "Error", "You can't define a date in the future.")
else:
QMessageBox.critical(
self, "Error", "The first date must be earlier than the second one."
)
return False