I have a task where the user can input the time (hour, minute, second) then he can give a second time (hour, minute, second) but this second time has to be in the same day as the first one and it have to be a later one. Example the user inputs 12:59:59, then 13:00:00. If its correct then it have to substract them.
I have been trying if the second hour is bigger then substract the hour, but the problem is with the minutes / seconds. I can't substract 0 from 59 or so..
/* Első időpont
var a = prompt("Add meg hogy hány óra van.");
var b = prompt("Add meg hogy hány perc van.");
var c = prompt("Add meg hogy hány másodperc van.");
// Második időpont
var d = prompt("Adj meg egy későbbi órát.");
var e = prompt("Add meg hogy hány perc van.");
var f = prompt("Add meg hogy hány másodperc van.");
if(isFinite(a) && isFinite(b) && isFinite(c)) {
if(a > d) {
document.write();
}
} else {
document.write("Nem számot adtál meg.");
}*/