📜  添加月份日期 python 代码示例

📅  最后修改于: 2022-03-11 14:45:16.340000             🧑  作者: Mango

代码示例4
# import datetime module
from datetime import timedelta, date

currentTimeDate = date.today() + relativedelta(months=5)
currentTime = currentTimeDate.strftime('%Y-%m-%d')

print(currentTime)

//Output:

2022-03-18