var testTime = function(t1, t2) {
var a = '01/10/2007 ' + t1;
var b = '01/10/2007 ' + t2;
var d = new Date(a);
var e = new Date(b);
if (d > e) {
return false;
} else {
return true;
}
}
if(testTime(currentTime.split(" ")[1],timer.split("-")[0]+':00:00')){
...
}