Use the datetime
method and the operator <
and its kin.
>>> from datetime import datetime, timedelta
>>> past = datetime.now() - timedelta(days=1)
>>> present = datetime.now()
>>> past < present
True
>>> datetime(3000, 1, 1) < present
False
>>> present - datetime(2000, 4, 4)
datetime.timedelta(4242, 75703, 762105)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…