blog/themes/typing/layout/_partial/post/date.ejs

7 lines
412 B
Plaintext
Raw Normal View History

<%/* Date format is specified to skip timezone conversion */%>
<% if (is_post()) { %>
<time class="dt-published" datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, 'D MMM YYYY') %></time>
<% } else { %>
<time datetime="<%= date(post.date, 'YYYY-MM-DD[T00:00:00.000Z]') %>" itemprop="datePublished"><%= date(post.date, 'D MMM YYYY') %></time>
<% } %>