mylloon.fr/templates/blog/date.html

18 lines
369 B
HTML
Raw Normal View History

2023-04-25 03:29:55 +02:00
<span>
{{#date}}
<script>
{
const date = new Date(+"{{year}}", +"{{month}}", +"{{day}}");
document.currentScript.outerHTML = date.toLocaleDateString(
navigator.language || navigator.userLanguage,
{
year: "numeric",
month: "long",
day: "numeric",
}
);
}
</script>
{{/date}}
</span>