scinote-web/app/assets/javascripts/shareable_links/date_formatting.js
sboursen-scinote 7b2a752d60 Fix multiple issues with shared task [SCI-8983]
- Circumvent authentication by using direct URL Users' avatars
- Change wrong completed-on icon
- Parse dates in browser's format
2023-08-08 11:11:46 +02:00

14 lines
309 B
JavaScript

/* global moment */
(function() {
$('.iso-formatted-date').each(function() {
const userLang = navigator.language || navigator.userLanguage || 'en-US';
let text = $(this).text().trim();
if (!text) {
return;
}
$(this).text(moment(text).local(userLang).format('LLL'));
});
}());