Skip to content
Snippets Groups Projects
Commit fe9a124f authored by ThibG's avatar ThibG Committed by Thibaut Girka
Browse files

[Glitch] Fix dates (without time) being rendered as datetimes in public pages


Port c31d61d7 to glitch-soc

Signed-off-by: default avatarThibaut Girka <thib@sitedethib.com>
parent b9aa57d5
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,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]');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment