# HG changeset patch # User neko259 # Date 2015-03-09 11:15:56 # Node ID 0e2fda16c0e2641d5e1ceee513347511187a302b # Parent c84f21f323170ad60c5dc4ab871d69c7c28159a3 # Parent 67e2bbf8f0864b3a5f9b33f53b46d9146cc7c8e3 Merged with default diff --git a/boards/static/js/main.js b/boards/static/js/main.js --- a/boards/static/js/main.js +++ b/boards/static/js/main.js @@ -23,6 +23,15 @@ for the JavaScript code in this page. */ +var LOCALE = window.navigator.language; +var FORMATTER = new Intl.DateTimeFormat( + LOCALE, + { + weekday: 'short', year: 'numeric', month: 'short', day: 'numeric', + hour: 'numeric', minute: '2-digit', second: '2-digit' + } +); + /** * An email is a hidden file to prevent spam bots from posting. It has to be * hidden. @@ -40,6 +49,32 @@ function highlightCode(node) { }); } +/** + * Translate timestamps to local ones for all