about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-02-03 17:48:56 +0100
committerThibaut Girka <thib@sitedethib.com>2020-02-06 21:41:50 +0100
commitfe9a124f5a9f3a7cb6cfba141245cccb88c7dfbe (patch)
tree1cbb8b756a2e4d0770c19b834ede0326f99a3dcc /app/javascript/flavours/glitch
parentb9aa57d5bfd53eb73ff4bb5e1beb91ee181345eb (diff)
[Glitch] Fix dates (without time) being rendered as datetimes in public pages
Port c31d61d7f2d576b42ea82ab01470bce7e6e5a3a7 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/packs/public.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js
index d1adfb17a..d8a97704f 100644
--- a/app/javascript/flavours/glitch/packs/public.js
+++ b/app/javascript/flavours/glitch/packs/public.js
@@ -62,7 +62,7 @@ function main() {
       content.textContent = timeAgoString({
         formatMessage: ({ id, defaultMessage }, values) => (new IntlMessageFormat(messages[id] || defaultMessage, locale)).format(values),
         formatDate: (date, options) => (new Intl.DateTimeFormat(locale, options)).format(date),
-      }, datetime, now, now.getFullYear());
+      }, datetime, now, now.getFullYear(), content.getAttribute('datetime').includes('T'));
     });
 
     const reactComponents = document.querySelectorAll('[data-component]');