about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-02-03 17:48:56 +0100
committermultiple creatures <dev@multiple-creature.party>2020-02-21 02:46:38 -0600
commit0f5411b7999cfc737aa281f17112d96bbfaa0373 (patch)
tree88ed3d79bd30dd1b4ec1affab4ee85f7f361eabc /app
parent213424006abc183ba5e3b3b3a86374e5dabaaea7 (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')
-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 da0b4c8e0..c2a1d9d62 100644
--- a/app/javascript/flavours/glitch/packs/public.js
+++ b/app/javascript/flavours/glitch/packs/public.js
@@ -54,7 +54,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]');