import datetime now = datetime.datetime.now() since = now - datetime.(days = 5) desired_time = [] if (desired_time >= since or desired_time <= now): print (input)