Q:

Jinja2 adding 3 to days for every month in calendar

Seem to be having issues with adding days to the days of any month that is less than 29.  If the days are 30 and over I will add a month and then subtract the total days + 10 to get the new date.   Otherwise I want to add 10 to the days if it is less than 29.

A:

If you find yourself doing manual date math, take a step back. This is never the right solution. You don't know all the rules around time zones, leap years, daylight savings, etc.
Use timedelta to add days to a date and strftime() to format a date for display. And for the love of god don’t do this in Jinja! Get the date set up in Python and then pass it into Jinja ready for display.
Python file
from datetime import timedelta
newdate = mydate + timedelta(days=3)

Jinja template
{{ newdate.strftime('%Y/%m/%d') }}

