Commit 95d454c6 authored by Murukesh Mohanan's avatar Murukesh Mohanan

typos

parent 92c36522
Pipeline #1292 failed with stage
function getTimeSince(starttime) { function getTimeSince(startTime) {
var t = Date.parse(new Date()) - Date.parse(starttime); var t = Date.parse(new Date()) - Date.parse(startTime);
var seconds = Math.floor((t / 1000) % 60); var seconds = Math.floor((t / 1000) % 60);
var minutes = Math.floor((t / 1000 / 60) % 60); var minutes = Math.floor((t / 1000 / 60) % 60);
var hours = Math.floor((t / (1000 * 60 * 60)) % 24); var hours = Math.floor((t / (1000 * 60 * 60)) % 24);
...@@ -31,7 +31,7 @@ function updateArc(id, value, max) { ...@@ -31,7 +31,7 @@ function updateArc(id, value, max) {
elem.setAttribute("stroke-dasharray", barLength + " " + circumference); elem.setAttribute("stroke-dasharray", barLength + " " + circumference);
} }
function initializeClock(id, endtime) { function initializeClock(id, startTime) {
var clock = document.getElementById(id); var clock = document.getElementById(id);
var daysElem = clock.querySelector('#days'); var daysElem = clock.querySelector('#days');
var hoursElem = clock.querySelector('#hours'); var hoursElem = clock.querySelector('#hours');
...@@ -45,7 +45,7 @@ function initializeClock(id, endtime) { ...@@ -45,7 +45,7 @@ function initializeClock(id, endtime) {
} }
function updateClock() { function updateClock() {
var t = getTimeRemaining(endtime); var t = getTimeSince(startTime);
daysElem.innerHTML = plural(t.days, 'day', 'days'); daysElem.innerHTML = plural(t.days, 'day', 'days');
hoursElem.innerHTML = plural(t.hours, 'hour', 'hours'); hoursElem.innerHTML = plural(t.hours, 'hour', 'hours');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment