Commit 7e43fce2 authored by Kaushal Modi's avatar Kaushal Modi

Don't show "Updated on" string if update happened on the same day

parent 1b6234fd
......@@ -11,7 +11,8 @@
string.
-->
{{ printf `<time datetime="%s" class="dt-published">%s</time>` $date_meta $date_display | safeHTML }}
{{ if (and (not $p.Lastmod.IsZero) (not (eq $p.Lastmod $p.Date))) }}
<!-- Don't show "Updated on" string if update happened on the same day. -->
{{ if (and (not $p.Lastmod.IsZero) (not (eq (dateFormat "2006-01-02" $p.Lastmod) (dateFormat "2006-01-02" $p.Date)))) }}
{{ $lastmod_display := dateFormat (.fmtupd | default .fmt) $p.Lastmod }}
<span class="dt-updated">(Updated on {{ $lastmod_display -}})</span>
{{ end }}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment