Skip to content

Time Tag ​

Last updated View as Markdown

You get an HTML <time> tag for a date. The date is printed in UTC in the datetime attribute. Give a date format to set the text. Without a format, you get a date like Sat, 04 Apr 2026 21:15:00 +0000. Use the datetime option to give another format for the attribute.

Example ​

liquid
{{ article.created_at | time_tag: '%B %d, %Y' }}

Output

html
<time datetime="2026-04-04T21:15:00Z">April 04, 2026</time>