# 先导入包:
import calendar
import datetime
from datetime import timedelta
# 获取今天日期:
# 返回datetime格式:eg:2019-12-07 20:38:35.82816
now = datetime.datetime.now()
# 返回datetime格式:eg:2019-12-07
now1 = datetime.datetime.now().date()
now2 = datetime.date.today()
# 获取昨天日期:
yesterday = now - timedelta(days=1)
# 获取明天日期:
tomorrow = now + timedelta(days=1)
# 获取本周第一天和最后一天:
this_week_start