mylloon.fr/templates/blog/date.html

18 lines
373 B
HTML
Raw Normal View History

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