blob: 112e57f8ef50685fd5d242ab7410678a5ff33268 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<script src="https://cdn.jsdelivr.net/npm/luxon@1.26.0" integrity="sha256-4sbTzmCCW9LGrIh5OsN8V5Pfdad1F1MwhLAOyXKnsE0=" crossorigin="anonymous"></script>
<script>
function formatDate() {
$('span[data-format="luxon"]').each(function () {
var date = $(this).text()
$(this).text(luxon.DateTime.fromISO(date, { locale: {{ .Site.Language.Lang }} }).toFormat({{ .Site.Params.Experimental.jsDateFormat | default "yyyy-MM-dd" }}))
})
}
formatDate()
</script>
|