« get me outta code hell

content, client, css: generateArtistRollingWindowPage - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client-util.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-03-11 19:34:40 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-07-11 08:23:19 -0300
commitf8b24147722763117c3bc3a2368c7b4ac2826ea4 (patch)
treea9a2af89b3aa9e46b430f9a860898f0a797c621e /src/static/js/client-util.js
parentdf8ddccb30f86f1f67f8099ca5368783bea47088 (diff)
content, client, css: generateArtistRollingWindowPage
Diffstat (limited to 'src/static/js/client-util.js')
-rw-r--r--src/static/js/client-util.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/static/js/client-util.js b/src/static/js/client-util.js
index 71112313..5a35bcf2 100644
--- a/src/static/js/client-util.js
+++ b/src/static/js/client-util.js
@@ -127,3 +127,10 @@ export function dispatchInternalEvent(event, eventName, ...args) {
 
   return results;
 }
+
+const languageCode = document.documentElement.getAttribute('lang');
+
+export function formatDate(inputDate) {
+  const date = new Date(inputDate);
+  return date.toLocaleDateString(languageCode);
+}