# Работа с датами и временем

{{ date() }} – **вывести текущую дату и время**

{{ date(“d.m.Y H:i:s”) }} – **вывести текущую дату и время в заданном формате, для текущего примера 31.01.2023 13:00:00**

Можно задавать более точное временное окно. Например, можно вывести дату и время вчерашнего или завтрашнего дня. Либо любой день недели на прошлой или будущей недели.

Вчера – {{ date(“d.m.Y”, ”yesterday”) }}&#x20;

Завтра – {{ date(“d.m.Y”, “tomorrow”) }}&#x20;

Послезавтра – {{ date(“d.m.Y”, “+ 2 days”) }}&#x20;

Следующая среда – {{ date(“d.m.Y”, “next wednesday”) }}&#x20;

Прошлая пятница – {{ date(“d.m.Y”, “last friday”) }}&#x20;

Этот четверг – {{ date(“d.m.Y”, “this thursday”) }}&#x20;

14 дней вперед – {{ date(“d.m.Y”, “+ 14 days”) }}&#x20;

7 дней назад – {{ date(“d.m.Y”, “- 7 days”) }}&#x20;

2 часа вперед – {{ date(“d.m.Y”, “+ 2 hours”) }}&#x20;

<mark style="color:red;">\*</mark>(Часовой пояс по умолчанию UTC-0, по гринвичу)&#x20;

Описание шаблонов даты –  <https://www.php.net/manual/ru/datetime.format.php>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.cleverapp.pro/obzor-platformy/rabota-s-datami-i-vremenem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
