diff options
Diffstat (limited to 'tempo.js')
-rw-r--r-- | tempo.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -13,6 +13,8 @@ function padTime(x) { } function updateTime() { + var timeformat = localStorage['timeformat']; + var date = new Date(); var h = date.getHours(); @@ -25,6 +27,10 @@ function updateTime() { var str_d = dd + " " + months[dm] + " " + dy; + if(timeformat == '12') { + h = (h + 11) % 12 + 1; + } + document.getElementById("h").innerHTML = padTime(h); document.getElementById("m").innerHTML = padTime(m); document.getElementById("s").innerHTML = padTime(s); |