mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
use time.Format to localize date
This commit is contained in:
parent
cbdc2a3f1d
commit
bbca1dfce2
@ -6,7 +6,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<footer class="article-time">
|
<footer class="article-time">
|
||||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
{{- time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") .Date -}}
|
||||||
</time>
|
</time>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<div>
|
<div>
|
||||||
{{ partial "helper/icon" "date" }}
|
{{ partial "helper/icon" "date" }}
|
||||||
<time class="article-time--published">
|
<time class="article-time--published">
|
||||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
{{- time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") .Date -}}
|
||||||
</time>
|
</time>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user