How to increment datetime by custom months in python without using library - Stack Overflow

PHOTO EMBED

Thu Jun 29 2023 17:14:59 GMT+0000 (Coordinated Universal Time)

Saved by @Rapha9000 #python

from datetime import datetime
from dateutil.relativedelta import relativedelta
    
date_after_month = datetime.today()+ relativedelta(months=1)
print('Today: ',datetime.today().strftime('%d/%m/%Y'))
print('After Month:', date_after_month.strftime('%d/%m/%Y'))
content_copyCOPY

https://stackoverflow.com/questions/4130922/how-to-increment-datetime-by-custom-months-in-python-without-using-library