This how to will show you how to format a date with the pipeline format function.
You can apply it to any date variable such as:
Without any formatting, the date is given in the iso date format
${now}
2025-08-26T21:00:04+00:00
To apply a formatting, you need to use the format function
${now | format()}
The output is a date formatted to the default format of your locale (ie country and language)
Tuesday, August 26, 2025
To have it refresh every day, we expire the page cache date daily
Today's date with a date pattern where:
${now | format( "MMM dd" )}
Aug 26
Because a pipeline is an expression, you can even format a date written in your content.
${"2022-05-05" | format()}
Thursday, May 5, 2022
${now | format( "", "fr_FR" )}
mardi 26 août 2025
${now | format( "", "en_GB" )}
Tuesday, 26 August 2025
You can also print the date metadata of a page.
For instance, for the date of this article
* ${date_created | format()}
* ${date_modified | format()}
* ${date_published | format()}
The output is: