diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-02-28 09:03:27 -0800 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-02-28 09:03:27 -0800 |
commit | 87530f8d03cab2ba535250b404d358315c60e7b0 (patch) | |
tree | d2425bdca8835e561edc75cb295eaeb42ee42990 /tempo.js | |
parent | 11a2d3e6910850ec15461b602321216c33170104 (diff) | |
download | tempo-87530f8d03cab2ba535250b404d358315c60e7b0.tar.gz tempo-87530f8d03cab2ba535250b404d358315c60e7b0.tar.xz |
Slightly simpler time formatting.
Diffstat (limited to 'tempo.js')
-rw-r--r-- | tempo.js | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -2,8 +2,8 @@ // Distributed under the terms of the GNU General Public License v2. // See http://www.gnu.org/licenses/gpl-2.0.txt for the full license text. -var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', - 'August', 'September', 'October', 'November', 'December']; +var months = ['January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December']; var timeformat = null; @@ -26,15 +26,15 @@ function updateTime() { var dm = date.getMonth(); var dy = date.getFullYear(); - 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); + var str_t = padTime(h) + ' ' + padTime(m) + + '  ' + padTime(s); + var str_d = dd + ' ' + months[dm] + ' ' + dy; + + document.getElementById('timeval').innerHTML = str_t; document.getElementById('dateval').innerHTML = str_d; } |