Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters · mod_base
  • Reference
  • Frontend developer
  • Template filter
  • Transform
  • Date and time

add_day

Module

mod_base

Adds a day to a date. The value must be of the form {{Y,M,D},{H,I,S}}.

For example:

{{ value|add_day }}

When the value is {{2008,12,10},{15,30,0}}, the output is {{2008,12,11},{15,30,0}}.

The filter has an optional argument which defines the number of days to add:

{{ value|add_day:3 }}

When the value is {{2008,12,10},{15,30,0}}, the output is {{2008,12,13},{15,30,0}}.

Edit on GitHub

Related pages

  • sub_day Subtracts a day from a date. The value must be of the form {{Y,M,D},{H,I,S}} . →
  • add_week Adds a week to a date. The value must be of the form {{Y,M,D},{H,I,S}} . →
  • add_month Adds a month to a date. The value must be of the form {{Y,M,D},{H,I,S}} . →
  • add_year Adds a year to a date. The value must be of the form {{Y,M,D},{H,I,S}} . →

Related documentation

Filters

sub_year

Subtracts a year from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

sub_day

Subtracts a day from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

add_hour

Adds an hour to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

utc

Translates a datetime from local time to UTC.

Filters

add_year

Adds a year to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

sub_week

Subtracts a week from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

add_month

Adds a month to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

sub_hour

Subtracts an hour from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

add_week

Adds a week to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

GitHub © 2026 Zotonic