Comparez les dates à Python
jan_1_2020 = datetime.datetime(2020, 1, 1)
dec_12_2020 = datetime.datetime(2020, 12, 12)
if (jan_1_2020 < dec_12_2020):
print("first datetime is less than the second")
CompSciGeek