how to calculate one week ago in python code example
Example 1: 1 day ago python datetime
date_N_days_ago = datetime.now() - timedelta(days=N)
Example 2: python datetime get date one week from today
>>> import datetime
>>> datetime.datetime.now() + datetime.timedelta(days=7)