Date formatting

1 分で読めます

Date variables in a layout can be formatted with options between parentheses, separated by semicolons. Date ranges take the same options.

Examples

For a variable date with the value 2025-02-20:

TemplateResult
{{date(year: numeric; month: long; day: numeric)}}February 20th, 2025
{{date(year: 2-digit; month: short)}}Feb '25
{{date(month: long; day: numeric)}}February 20th

Options

  • year: numeric, 2-digit

  • month: numeric, 2-digit, long, short, narrow

  • day: numeric, 2-digit