From d0d3682ce1eb82af93befd86453f715178f96764 Mon Sep 17 00:00:00 2001 From: 20xd6 Date: Sat, 11 Apr 2020 13:19:45 -0400 Subject: [PATCH] Change formating of clock.js --- clock.js | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/clock.js b/clock.js index 8da80ff..d255d20 100644 --- a/clock.js +++ b/clock.js @@ -3,7 +3,7 @@ */ window.onload = startInterval; function startInterval(){ - setInterval("startTime();",1000); + setInterval("startTime();",1000); } /* The function to update and format the time displayed on the page. * The formating of Date() objects useing .toLocalString() is documented @@ -12,28 +12,28 @@ function startInterval(){ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString */ function startTime(){ - var current_time = new Date(), - our_tz = current_time.getTimezoneOffset; - document.getElementById('time_title').innerHTML = "Time is: " - + current_time.toLocaleString('en-US', - {timeZone: current_tz, - hourCycle:'h24', - timeStyle:'long', - hour: '2-digit', - minute:'2-digit', - second:'2-digit', - timeZoneName:'short'}); - document.getElementById('time_body').innerHTML = current_time.toLocaleString('en-EN' ,{ - timeZone: current_tz, - dateStyle:'long', - hourCycle:'h24', - weekday:'short', - month:'short', - day:'2-digit', - year:'numeric', - hour:'2-digit', - minute:'2-digit', - second:'2-digit', - timeZoneName:'short'}); - document.getElementById('JStz').innerHTML = current_tz; + var current_time = new Date(), + our_tz = current_time.getTimezoneOffset; + document.getElementById('time_title').innerHTML = "Time is: " + + current_time.toLocaleString('en-US', + {timeZone: current_tz, + hourCycle:'h24', + timeStyle:'long', + hour: '2-digit', + minute:'2-digit', + second:'2-digit', + timeZoneName:'short'}); + document.getElementById('time_body').innerHTML = current_time.toLocaleString('en-EN' ,{ + timeZone: current_tz, + dateStyle:'long', + hourCycle:'h24', + weekday:'short', + month:'short', + day:'2-digit', + year:'numeric', + hour:'2-digit', + minute:'2-digit', + second:'2-digit', + timeZoneName:'short'}); + document.getElementById('JStz').innerHTML = current_tz; }