Skip to main content

Documentation Index

Fetch the complete documentation index at: https://reportana.dev/llms.txt

Use this file to discover all available pages before exploring further.

Introduction

The date_modify filter allows modifying dates by adding or subtracting time periods such as days, months, or years. It is useful for dynamically adjusting the date in contexts where deadlines need to be manipulated or future and past dates calculated.

Example of Use

Example of how to add seven days to a specific date using the date_modify filter:
{{ NOW|date|date_modify('+7 days')|date('d/m/Y') }}
In this example, we use a combination of filters to manipulate the current date.
The goal is to get today’s date, add seven days to it using date_modify, and format the result with date.

Output Example of the Code

date_modify` Filter Result