code cleanup
parent
a520ac6289
commit
5a9f1aaaa3
11
js/level2.js
11
js/level2.js
|
@ -77,14 +77,11 @@ function refreshContent() {
|
||||||
|
|
||||||
var timeDifference;
|
var timeDifference;
|
||||||
|
|
||||||
var hours = time.substring(0, 2);
|
var busTime = moment()
|
||||||
var minutes = time.substring(3, 5);
|
.set('hour', time.substring(0, 2) )
|
||||||
|
.set('minute', time.substring(3, 5) );
|
||||||
|
|
||||||
var busTime = moment().set('hour', hours).set('minute', minutes);
|
timeDifference = busTime.diff( moment(), 'minutes' );
|
||||||
|
|
||||||
var now = moment();
|
|
||||||
|
|
||||||
timeDifference = busTime.diff( now, 'minutes' );
|
|
||||||
|
|
||||||
timeLeftMessage = 'departure in ' + timeDifference + ' minutes';
|
timeLeftMessage = 'departure in ' + timeDifference + ' minutes';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue