Skip to content

Date patterns

A template’s text can name today’s date in one of the fixed formats, such as {date.long}, or in a custom date: a pattern of your own, written between the brackets of {date.custom(…)}. In the builder, choose Custom as the date’s format and write the pattern; the picker shows what it reads today before you insert it.

Text Writes, on Thursday 22 October 2026
{date.custom(d.M.yyyy)} 22.10.2026
{date.custom(dd/MM/yy)} 22/10/26
{date.custom(MMM ''yy)} Oct '26
{date.custom(EEEE d MMMM)} Thursday 22 October
{date.custom('Week of' MMMM d)} Week of October 22
{date.custom(d. MMMM yyyy):de} 22. Oktober 2026

A pattern is spelled in the date letters Unicode’s date patterns use. Each run of one letter is one part of the date, and how many times it is written says how:

Letters Writes Example
y, yyyy the year 2026
yy the year’s last two digits 26
M the month’s number 10
MM the month’s number in two digits 10, 03
MMM the month’s short name Oct
MMMM the month’s name October
LLL, LLLL the month’s name standing alone, without a day lokakuu in Finnish
d the day 22, 3
dd the day in two digits 22, 03
E, EE, EEE the weekday’s short name Thu
EEEE the weekday’s name Thursday

M writes a month’s name as a date does, beside its day: Finnish writes 22. lokakuuta. Use L for a month written on its own, such as a heading reading lokakuu. The numbers are always the Gregorian date in Western digits, whatever the language.

Anything that is not a letter is written as it is: ., /, -, spaces, commas. Letters you mean as text go in single quotes, 'Week of' MMMM d, and two single quotes write one: MMM ''yy writes Oct '26.

Names are written in the language the template is read in, as the fixed formats are: the one the read names with lang, else your workspace’s default language. To fix the language whoever reads it, name it after the closing bracket: {date.custom(d. MMMM yyyy):de} always writes 22. Oktober 2026.

A publish refuses a pattern it cannot write, saying why (date_pattern_invalid, the pattern as its given), and the builder’s picker says so before you insert it:

  • a letter that is no date letter, such as h or o: quote it to write it as text;
  • a letter written a number of times it is not written in, such as yyy or ddd;
  • a quote that is not closed;
  • a brace, { or }, which would end or start a value in the text;
  • a pattern with no part of the date in it.

Times of day are not offered: a template’s dates are read for the day it is read or drawn on.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors