Skip to content

Commit

Permalink
clean up comments in app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Rdjarbeng committed Apr 1, 2022
1 parent 29c6aff commit 8e05d2a
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// import Clock, { NewYearClock } from './js/clock.js'
// // import { NewYearClock } from './js/clock.js'
class Clock {
constructor(endDate) {
// expecting a date object
Expand All @@ -24,11 +22,6 @@
// Time calculations for days, hours, minutes and seconds
this.calculateTimeValues(distance)
} else {
//reset to end of year
// this.setEndDate()
//todo: Countup from the deadline date
// this.calculateTimeValues(Math.abs(distance));

// clear date values
this.resetMethod();

Expand Down Expand Up @@ -68,29 +61,17 @@ class NewYearClock extends Clock{
let dayCount = document.getElementById("countDay");
const animatedCountDuration = 800;

// let controls = document.getElementsByClassName("button");
// let startButton = document.getElementById('startButton');
// let stopButton = document.getElementById('stopButton');
const body = document.body;
var dayNumber = document.getElementById('day-num');
var hourNumber = document.getElementById("hour-num");
var minNumber = document.getElementById("min-num");
var secNumber = document.getElementById("sec-num");
var dueDate = document.getElementById('dueDate');
// const dateInput = document.getElementById('customDate')

// const customDayNumber = document.getElementById('day-custom');
// const customHourNumber = document.getElementById("hour-custom");
// const customMinNumber = document.getElementById("min-custom");
// const customSecNumber = document.getElementById("sec-custom");

//to stop the clock
let intervalID;
let customClockMovement = false;
let dayClock = new NewYearClock();
// let countItem = { text: 'test', date: '03-03-2022', dateModified: new Date() };
// localStorage.setItem('mainClock', JSON.stringify(countItem))

// Initialize default Clock class
// var myclock = new NewYearClock();
var myclock = setMainClock();
Expand All @@ -105,7 +86,6 @@ function setMainClock() {
myclock = new Clock(new Date(mainclock.date));
setMainText(mainclock.text)
}

return myclock || new NewYearClock();

}
Expand All @@ -132,7 +112,6 @@ function startTime(clock, { dayNumber, hourNumber, minNumber, secNumber }) {
updateDisplay(customClock, customDayNumber, customHourNumber, customMinNumber, customSecNumber);
}
}

// add zero in front of numbers < 10
function addZeros(time) {
if (time < 10) {
Expand All @@ -157,9 +136,6 @@ function updateDisplay(counter, dayDisplay, hourDisplay, minDisplay, secDisplay)
setInnerHtmlForNotNull(secDisplay, `${s}`);
}



//todo: find a better way of checking for a valid date
/**
* Listens for a user input for date element
*/
Expand Down

0 comments on commit 8e05d2a

Please sign in to comment.