El día anterior hoy en día Python DateTe
from datetime import datetime, timedelta
d = datetime.today() - timedelta(days=days_to_subtract)
Xenophobic Xenomorph
from datetime import datetime, timedelta
d = datetime.today() - timedelta(days=days_to_subtract)
from datetime import datetime
your_date = datetime.strptime('26 June 2021', '%d %b %Y')
# Using the .replace() method:
newdatetime = your_date.replace(day=1)
# 2021-06-01 00:00:00
import datetime
from datetime import timedelta
d = int(input('enter the day: '))
m = int(input('enter the month: '))
y = int(input('enter the year: '))
today = datetime.date(y, m, d)
tom = today + timedelta(days=1)
print('next day is', tom)