> ## Documentation Index
> Fetch the complete documentation index at: https://reportana.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# date_modify

### 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:

```twig theme={null}
{{ 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

<img src="https://mintcdn.com/reportana/9HogJxt6BTsd31jh/datemodify-en.png?fit=max&auto=format&n=9HogJxt6BTsd31jh&q=85&s=e15277d41b045eff8b771959e133fe95" alt="date_modify` Filter Result" width="187" height="78" data-path="datemodify-en.png" />
