mylloon.fr/templates/blog/date.html
2023-05-02 23:21:57 +02:00

17 lines
373 B
HTML

<span>
{{#date}}
<script>
{
const date = new Date(+"{{year}}", +"{{month}}" - 1, +"{{day}}");
document.currentScript.outerHTML = date.toLocaleDateString(
navigator.language || navigator.userLanguage,
{
year: "numeric",
month: "long",
day: "numeric",
}
);
}
</script>
{{/date}}
</span>