Date formatting
1 min läsning
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:
| Template | Result |
|---|---|
{{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-digitmonth:numeric,2-digit,long,short,narrowday:numeric,2-digit