Skip to content
Snippets Groups Projects
Unverified Commit c31d61d7 authored by ThibG's avatar ThibG Committed by GitHub
Browse files

Fix dates (without time) being rendered as datetimes in public pages (#13034)

parent 5265df0a
No related branches found
No related tags found
No related merge requests found
......@@ -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]');
......
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