feat(clock): Add Day, Month and Year

This commit is contained in:
Lucàs
2023-06-26 15:39:17 +02:00
parent 726e5af29b
commit 73633fe4f0
+2 -1
View File
@@ -21,6 +21,7 @@ export const data = {
setInterval(() => {
const now = new Date();
displayElement.innerText = now.toLocaleTimeString(language);
dayElement.innerText = now.toLocaleDateString(language, {weekday: 'long'});
dayElement.innerText = now.toLocaleDateString(language,
{weekday: 'long', year: 'numeric', month: 'long', day: '2-digit'});
}, 1000);
</script>