Инструменты пользователя

Инструменты сайта


en:autorun:documentation:date

FIXME Эта страница пока что не переведена полностью. Пожалуйста, помогите завершить перевод.
(Сотрите это сообщение по окончании перевода.)

Date

Date([<format>])
Date <VAR> [<format>]

Возвращает текущую дату, с опциональным форматированием.

Параметры

formatОпционально. Шаблон, согласно которому будет выполняться форматирование даты. Подробнее см. ниже. Если параметр опущен, будет возвращена строка с датой в коротком формате.

Форматирование

Регистр важен!

d Day of the month as digits without leading zeros for single-digit days.
dd Day of the month as digits with leading zeros for single-digit days.
ddd Abbreviated day of the week, for example, «Mon».
dddd Day of the week, for example, «Monday».
M Month as digits without leading zeros for single-digit months.
MM Month as digits with leading zeros for single-digit months.
MMM Abbreviated month, for example, «Nov».
MMMM Month, for example, «November» for English, and «Noviembre» for Spanish.
y Year represented only by the last digit.
yy Year represented only by the last two digits. A leading zero is added for single-digit years.
yyyy Year represented by a full four or five digits, depending on the calendar used.

Связанные

Time

Примечания

Если строка форматирования некорректная, макрос ERROR будет установлен в 1.

en/autorun/documentation/date.txt · Последнее изменение: 2023/05/06 20:06 — loopback

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki