M
M
Matvey Tomilov2021-02-01 10:58:40
MODX
Matvey Tomilov, 2021-02-01 10:58:40

How to display date + n days in modx?

Good afternoon, how to display the date in modx, which will come in a few days? And most importantly, that she would understand that after 01/31/21 comes 1.02, and not 01/32/21

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sashabeep, 2021-02-01
@etozhematvekat

In general, modx has nothing to do with it. You need a date from the current day?

$date = strtotime("+7 day");
echo date('d.m.Y', $date);

A
Alexander Lunegov, 2021-02-02
@alelunegov

You can create an extra snippet (for MODX this is an extra database call), or you can use output modifiers that can do a lot, and this too: Date modifier date
30.12.2024
formats .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question