2018-02-21 python python datetime compare 时间间隔timedelta可用于计算/比较可以直接用timedelta( days=1 )来进行日期的计算,大小判断 1234from datetime import timedeltastart_date = timezone.now().date()end_date = start_date + timedelta( days=1 ) Entry.objects.filter(created__range=(start_date, end_date)) stack overflow Newer mysql field length Older mongodb compact disk space