From b0ba681538333a52a108eff59d7a4708f133455b Mon Sep 17 00:00:00 2001 From: Thomas Hervey Date: Tue, 17 Jul 2018 16:07:47 -0400 Subject: [PATCH] fix browser-specific Date() issues in notes --- modules/ui/note_comments.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ui/note_comments.js b/modules/ui/note_comments.js index a9890779c..d22740481 100644 --- a/modules/ui/note_comments.js +++ b/modules/ui/note_comments.js @@ -99,6 +99,7 @@ export function uiNoteComments() { if (!s) return null; var detected = utilDetect(); var options = { day: 'numeric', month: 'short', year: 'numeric' }; + s = s.replace(/-/g, '/'); // fix browser-specific Date() issues var d = new Date(s); if (isNaN(d.getTime())) return null; return d.toLocaleDateString(detected.locale, options);