Show More
@@ -23,14 +23,16 b'' | |||||
23 | for the JavaScript code in this page. |
|
23 | for the JavaScript code in this page. | |
24 | */ |
|
24 | */ | |
25 |
|
25 | |||
26 | var LOCALE = window.navigator.language; |
|
26 | if (window.Intl) { | |
27 | var FORMATTER = new Intl.DateTimeFormat( |
|
27 | var LOCALE = window.navigator.language; | |
28 | LOCALE, |
|
28 | var FORMATTER = new Intl.DateTimeFormat( | |
29 | { |
|
29 | LOCALE, | |
30 | weekday: 'short', year: 'numeric', month: 'short', day: 'numeric', |
|
30 | { | |
31 | hour: 'numeric', minute: '2-digit', second: '2-digit' |
|
31 | weekday: 'short', year: 'numeric', month: 'short', day: 'numeric', | |
32 | } |
|
32 | hour: 'numeric', minute: '2-digit', second: '2-digit' | |
33 | ); |
|
33 | } | |
|
34 | ); | |||
|
35 | } | |||
34 |
|
36 | |||
35 | /** |
|
37 | /** | |
36 | * An email is a hidden file to prevent spam bots from posting. It has to be |
|
38 | * An email is a hidden file to prevent spam bots from posting. It has to be | |
@@ -53,6 +55,10 b' function highlightCode(node) {' | |||||
53 | * Translate timestamps to local ones for all <time> tags inside node. |
|
55 | * Translate timestamps to local ones for all <time> tags inside node. | |
54 | */ |
|
56 | */ | |
55 | function translate_time(node) { |
|
57 | function translate_time(node) { | |
|
58 | if (window.Intl === null) { | |||
|
59 | return; | |||
|
60 | } | |||
|
61 | ||||
56 | var elements; |
|
62 | var elements; | |
57 |
|
63 | |||
58 | if (node === null) { |
|
64 | if (node === null) { |
@@ -26,7 +26,7 b'' | |||||
26 | {% endcomment %} |
|
26 | {% endcomment %} | |
27 | {% if thread.archived %} |
|
27 | {% if thread.archived %} | |
28 | {% if is_opening %} |
|
28 | {% if is_opening %} | |
29 | — {{ thread.bump_time }} |
|
29 | — <time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time|date:'r' }}</time> | |
30 | {% endif %} |
|
30 | {% endif %} | |
31 | {% endif %} |
|
31 | {% endif %} | |
32 | {% if is_opening and need_open_link %} |
|
32 | {% if is_opening and need_open_link %} |
General Comments 0
You need to be logged in to leave comments.
Login now