diff options
| author | czaks <marcin@6irc.net> | 2013-07-02 20:58:16 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-07-02 20:58:16 -0400 |
| commit | dfe31de15669bb10e87db98418b5bd36bd4c4a6e (patch) | |
| tree | 6be6e1fc2af8e9a8686b6a6fa8b3daa91d115daa /js | |
| parent | 6961f5b8b5da98413468bb888eb24254e78970ae (diff) | |
local-time.js: make it work in localised environments
Diffstat (limited to 'js')
| -rw-r--r-- | js/local-time.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/local-time.js b/js/local-time.js index b92cc5be..bb81c83a 100644 --- a/js/local-time.js +++ b/js/local-time.js @@ -25,13 +25,13 @@ onready(function(){ var times = document.getElementsByTagName('time'); for(var i = 0; i < times.length; i++) { - if(!times[i].innerHTML.match(/^\d+\/\d+\/\d+ \(\w+\) \d+:\d+:\d+$/)) + if(typeof times[i].getAttribute('data-local') == 'undefined') continue; var t = iso8601(times[i].getAttribute('datetime')); - + times[i].setAttribute('data-local', 'true'); times[i].innerHTML = // date zeropad(t.getMonth() + 1, 2) + "/" + zeropad(t.getDate(), 2) + "/" + t.getFullYear().toString().substring(2) + |
