about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-02-03 17:48:56 +0100
committerGitHub <noreply@github.com>2020-02-03 17:48:56 +0100
commitc31d61d7f2d576b42ea82ab01470bce7e6e5a3a7 (patch)
treec2325fb2da04e10cc0904337fa2f063b64789fda /app/javascript
parent5265df0a8a9d66a88cbb45bff5e9316a357e934a (diff)
Fix dates (without time) being rendered as datetimes in public pages (#13034)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/packs/public.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index 9bc6214af..2fb9cb29d 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -82,7 +82,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]');