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:46:38 -0600 |
commit | 0f5411b7999cfc737aa281f17112d96bbfaa0373 (patch) | |
tree | 88ed3d79bd30dd1b4ec1affab4ee85f7f361eabc /app | |
parent | 213424006abc183ba5e3b3b3a86374e5dabaaea7 (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.js | 2 |
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]'); |