Datetime
Datetime items
Datetime
add_daysShifts a date by a whole number of days, forward on a positive
amount and back on a negative one, so {{ now | add_days:14 | date:'Y-m-d' }}
is the date a fortnight from today and add_days:-7 is the date a week ago.{{ today | add_days:14 | date:'Y-m-d' }}add_monthsShifts a date by a whole number of calendar months, forward on a
positive amount and back on a negative one.{{ charged_on | add_months:1 | date:'Y-m-d' }}add_yearsShifts a date by a whole number of years, forward on a positive
amount and back on a negative one.{{ bought_on | add_years:years | date:'Y-m-d' }}days_betweenCounts the whole days from the value to the argument, positive
when the argument is the later of the two and negative when it is earlier, so
{{ now | days_between:expires_at }} is how many days are left.expires in {{ today | days_between:expires_at }} days