diff options
author | ThibG <thib@sitedethib.com> | 2020-02-03 17:48:56 +0100 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 02:48:40 -0600 |
commit | 0e1ef49bc255e31dc9846616433959904c42aa91 (patch) | |
tree | d48e7f89dee042f023bb9f23210dd7ba00b897d6 | |
parent | 804d30939f52b6fdbb70f97a386a6c0f19cf87e2 (diff) |
Fix dates (without time) being rendered as datetimes in public pages (#13034)
-rw-r--r-- | app/javascript/packs/public.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 76b7e408e..9d49a2002 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -75,7 +75,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]'); |