date
Formats a date in the store’s time zone.
Takes a strftime format, or format: with a named format (abbreviated_date, basic, date, on_date, long, short). On Arabic pages month and day names are Arabic, and calendar: ‘hijri’ gives the Hijri date. ‘now’ is the current time.
Syntax
Section titled “Syntax”date | date: '%d %b %Y' · date | date: format: 'long' · date | date: calendar: 'hijri'Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
format |
string | strftime format (default “%b %d, %Y”). |
calendar |
string | hijri or gregorian. |
Returns
Section titled “Returns”string
Examples
Section titled “Examples”{{ article.published_at | date: '%d %B %Y' }} · {{ article.published_at | date: format: 'basic' }}14 March 2026 · 03/14/2026Arabic page
Section titled “Arabic page”{{ article.published_at | date: '%d %B %Y' }} · {{ article.published_at | date: calendar: 'hijri' }}14 مارس 2026 · 25 رمضان 1447 هـRelated
Section titled “Related”Compatibility
Section titled “Compatibility”Since theme platform 1.0.
Was this page helpful?

