date

Format a date string or timestamp into a customized date format string.

Syntax

{{ date_string | date: format }}

Example

{% assign created_at = "2026-04-20" %}{{ created_at | date: "%Y" }} Edition

Output

2026 Edition

The date filter parses standard date strings or timestamps and formats them using strftime-compatible format directives. Using year-only directives like %Y guarantees consistent output independent of server time zones.

In programmatic SEO architectures, date timestamps verify content freshness for search engine crawlers and users alike. For example: {{ site.generated_date | date: '%Y' }} Comprehensive Guide to {{ row.service }}. This confirms that the directory data is up to date, improving search snippet click-through rates.

Try this syntax in the editor.