Date and Time Helpers
Insert dates and times automatically in your templates.
Moment
The {{moment}} helper can output dates, times, and manipulate existing date values.
The date examples below are interactive. You can change the helper options to see how they work.
| What you can insert | Variable and preview |
|---|---|
| Today's full date | Template Preview February 02 2026 |
| Custom date format | Template Preview 2026 Feb See all possible formatting values. |
| Current time (24h) | Template Preview 15:06:49 |
| Current time (12h) | Template Preview 03:06:49 PM |
| 7 days from today | Template Preview February 09 2026 |
| 7 days before today | Template Preview January 26 2026 |
| Thursday next week | Template Preview February 12 2026 |
| Next day of the week | Template Preview Tuesday |
| Previous day of the week | Template Preview Sunday |
| End of the week | Template Preview February 07 2026 |
| Time from now to a different date | Template Preview 7 months ago |
| Time to now from a different date | Template Preview in 3 years |
| Days in the current month | Template Preview 28 |
| Week of the year | Template Preview 6 |
| Today's date in a different language | Template Preview février 02 2026 See the list of supported locales. |
You can combine different options to get the date you need. For example, to get only the day the week, 3 days from now, in French, you can use {{moment add="3;days" format="dddd" locale="fr"}}. This will output jeudi.
Formatting dates
Customize your dates exactly how you need them using the format option on the {{moment}} helper. This option supports various tokens (special characters) that act as placeholders for specific date components like years, months, or days.
All tokens are case-sensitive. Ensure you use the exact uppercase or lowercase characters in the reference tables.
Year, month, and day tokens
| Token | Example | Description |
|---|---|---|
YYYY | 2026 | 4 or 2 digit year |
YY | 26 | 2 digit year |
Y | -25 | Year with any number of digits and sign. Useful for years that are not 4 digits or are before the common era. |
Q | 1..4 | Quarter of year. Sets month to first month in quarter. |
M | 1..12 | Month number |
MM | 01..12 | Month number. Always two digits. |
MMM | Jan..Dec | Month name in the current locale. Short version. |
MMMM | January..December | Month name in the current locale. Long version. |
D | 1..31 | Day of month |
DD | 01..31 | Day of month. Always two digits. |
Do | 1st..31st | Day of month with ordinal |
DDD | 1..365 | Day of year |
DDDD | 001..365 | Day of year. Always three digits. |
X | 1770037609 | Unix timestamp |
x | 1770037609939 | Unix ms timestamp |
Week year, week, and weekday tokens
For these, the lowercase tokens use the locale aware week start days, and the uppercase tokens use the ISO week date start days.
| Token | Example | Description |
|---|---|---|
gggg | 2026 | Locale 4 digit week year |
gg | 26 | Locale 2 digit week year |
w | 1..53 | Locale week of year |
ww | 01..53 | Locale week of year. Always two digits. |
e | 0..6 | Locale day of week |
ddd | Mon...Sun | Day name in the current locale. Short version. |
dddd | Monday...Sunday | Day name in the current locale. Long version. |
GGGG | 2026 | ISO 4 digit week year |
GG | 26 | ISO 2 digit week year |
W | 1..53 | ISO week of year |
WW | 01..53 | ISO week of year. Always two digits. |
E | 1..7 | ISO day of week |
Locale aware formats
Locale aware date and time formats are also available using LT LTS L LL LLL LLLL.
| Token | Example | Description |
|---|---|---|
L | 09/04/1986 | Date (in local format) |
LL | September 4 1986 | Month name, day of month, year |
LLL | September 4 1986 8:30 PM | Month name, day of month, year, time |
LLLL | Thursday, September 4 1986 8:30 PM | Day of week, month name, day of month, year, time |
LT | 8:30 PM | Time (without seconds) |
LTS | 8:30:00 PM | Time (with seconds) |
Hour, minute, second, millisecond, and offset tokens
| Token | Example | Description |
|---|---|---|
H HH | 0..23 | Hours (24 hour time) |
h hh | 1..12 | Hours (12 hour time used with a A.) |
k kk | 1..24 | Hours (24 hour time from 1 to 24) |
a A | am pm | Post or ante meridiem (Note: a p are also valid) |
m mm | 0..59 | Minutes |
s ss | 0..59 | Seconds |
Z ZZ | +12:00 | Offset from UTC as +-HH:mm, +-HHmm, or Z |
Supported languages for dates
By default, the {{moment}} helper uses the language set on your computer.
For example, if your computer’s language is set to Spanish, using {{moment}} without any options will display febrero 02 2026.
To display the date in a different language, you can specify the locale option with the language you want.
The moment helper supports the following language codes:
moment helper supports the following language codes:- af (Afrikaans)
- ar-dz (Arabic - Algeria)
- ar-ly (Arabic - Libya)
- ar-ma (Arabic - Morocco)
- ar-sa (Arabic - Saudi Arabia)
- ar-tn (Arabic - Tunisia)
- ar (Arabic)
- az (Azeri)
- be (Belarusian)
- bg (Bulgarian)
- bn (Bengali)
- bo (Tibetan)
- bs (Bosnian)
- ca (Catalan)
- cs (Czech)
- cy (Welsh)
- da (Danish)
- de-at (German - Austria)
- de-ch (German - Switzerland)
- de (German)
- el (Greek)
- en-au (English - Australia)
- en-ca (English - Canada)
- en-gb (English - Great Britain)
- en-ie (English - Ireland)
- en-nz (English - New Zealand)
- en-us (English - United States)
- es-do (Spanish - Dominican Republic)
- es (Spanish)
- eu (Basque)
- fa (Farsi - Persian)
- fi (Finnish)
- fo (Faroese)
- fr-ca (French - Canada)
- fr-ch (French - Switzerland)
- fr (French)
- gd (Gaelic)
- he (Hebrew)
- hi (Hindi)
- hr (Croatian)
- hu (Hungarian)
- hy-am (Armenian)
- id (Indonesian)
- is (Icelandic)
- it (Italian)
- ja (Japanese)
- ka (Georgian)
- kk (Kazakh)
- km (Khmer)
- kn (Kannada)
- ko (Korean)
- lo (Lao)
- lt (Lithuanian)
- lv (Latvian)
- mk (Maori)
- ml (Malayalam)
- mr (Marathi)
- ms-my (Malay - Malaysia)
- ms (Malay)
- my (Burmese)
- nb (Norwegian)
- ne (Nepali)
- nl-be (Dutch - Belgium)
- nl (Dutch)
- pa-in (Punjabi)
- pl (Polish)
- pt-br (Portuguese - Brazil)
- pt (Portuguese)
- ro (Romanian)
- ru (Russian)
- sd (Sindhi)
- sk (Slovak)
- sl (Slovenian)
- sq (Albanian)
- sr-cyrl (Serbian - Cyrillic)
- sr (Serbian)
- sv (Swedish)
- sw (Swahili)
- ta (Tamil)
- te (Telugu)
- th (Thai)
- ttl-phh
- tr (Turkish)
- uk (Ukrainian)
- ur (Urdu)
- uz-latn
- uz (Uzbek)
- vi (Vietnamese)
- yo (Yoruba)
- zh-cn (Chinese - Simplified)
- zh-hk (Chinese - Hong Kong)
- zh-tw (Chinese - Taiwan)