From f98d5bdd180d7452e82d7e35dcd7e3372ccd2aab Mon Sep 17 00:00:00 2001 From: czaks Date: Tue, 2 Jul 2013 20:58:16 -0400 Subject: [PATCH] local-time.js: make it work in localised environments --- js/local-time.js | 4 ++-- 1 file 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) +