Skip to content

Commit

Permalink
[Glitch] Fix dates (without time) being rendered as datetimes in publ…
Browse files Browse the repository at this point in the history
…ic pages

Port c31d61d to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
  • Loading branch information
ClearlyClaire authored and multiple creatures committed Feb 21, 2020
1 parent 2134240 commit 0f5411b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/flavours/glitch/packs/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]');
Expand Down

0 comments on commit 0f5411b

Please sign in to comment.