today = date.today() tomorrow = today + timedelta(days=1) print('end', end) if end < today: status = 'Past' print("Статус отпуска изменен на Past") elif start <= today <= end: status = 'Active' print("Статус отпуска изменен на Active") elif start > tomorrow: status = 'Coming' print("Статус отпуска изменен на Coming")