Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
if date1 >= date2: pass
import datetime def trunc_datetime(someDate): return someDate.replace(day=1, hour=0, minute=0, second=0, microsecond=0) a = trunc_datetime(datetime.datetime(2018,2,15)) b = trunc_datetime(datetime.datetime(2018,3,20)) print(a <= b)