feat: updated date formatting logic

This commit is contained in:
Leyla Becker 2026-02-10 17:29:15 -06:00
parent 7b5f3adee9
commit a849a028ec
5 changed files with 8 additions and 8 deletions

View file

@ -5,9 +5,9 @@ layout: base.njk
<article class="blog-post">
<header class="post-header">
<h1>{{ title }}</h1>
<time datetime="{{ createdAt | dateFormat }}">{{ createdAt | dateFormat }}</time>
<time datetime="{{ createdAt | dateTimeFormat }}">{{ createdAt | dateTimeFormat }}</time>
{% if updatedAt and (updatedAt | isMoreThanHourAfter(createdAt)) %}
<p class="updated-at">Updated: <time datetime="{{ updatedAt | dateFormat }}">{{ updatedAt | dateFormat }}</time></p>
<p class="updated-at">Updated: <time datetime="{{ updatedAt | dateTimeFormat }}">{{ updatedAt | dateTimeFormat }}</time></p>
{% endif %}
</header>