diff options
author | tdro <tdro@noreply.example.com> | 2023-10-15 17:17:20 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-10-15 17:17:20 -0400 |
commit | a098764110b882a261fe0bf6ad14b7a0ea6e9f72 (patch) | |
tree | bb8b2f36eeec78e05aca6c241e25d38cdba2586e /themes/default/layouts/partials | |
parent | 30f40a84cf28fbffca82d04a35904eb2674593ae (diff) | |
download | canory-a098764110b882a261fe0bf6ad14b7a0ea6e9f72.tar.gz canory-a098764110b882a261fe0bf6ad14b7a0ea6e9f72.tar.bz2 canory-a098764110b882a261fe0bf6ad14b7a0ea6e9f72.zip |
static/js/timeago: Localize time
Diffstat (limited to 'themes/default/layouts/partials')
-rw-r--r-- | themes/default/layouts/partials/meta-context-menu.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/themes/default/layouts/partials/meta-context-menu.html b/themes/default/layouts/partials/meta-context-menu.html index 064d0d8..9429355 100644 --- a/themes/default/layouts/partials/meta-context-menu.html +++ b/themes/default/layouts/partials/meta-context-menu.html @@ -27,11 +27,21 @@ <micro-metadata-datetime> <a href="{{ $href }}"> {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/calendar.svg")) -}} - <span>{{ .Date | time.Format "Jan 2 2006" -}}</span> + <time + data-type="localDate" + datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}" + > + {{ .Date | time.Format "Jan 2 2006" -}} + </time> </a> <a href="{{ $href }}"> {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/clock.svg")) -}} - <span>{{ .Date | time.Format "15:04 MST" -}}</span> + <time + data-type="localTime" + datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}" + > + {{ .Date | time.Format "15:04 MST" -}} + </time> </a> </micro-metadata-datetime> </context-menu> |