calculation between two time slots, I retrieve a time from my database example: 11:50 and the current time is 18:50. How to calculate interval between the two schedules? thank you for help.
const currentTime = new Date();
const timeMinutes = currentTime.getMinutes()
if(timeMinutes < 10){
var timeMinute = '0' + timeMinutes
}else{
timeMinute = timeMinutes
}
const heureCommande = currentTime.getHours() + ":" + timeMinute
console.log(heureCommande)
console.log(heureCommande - 18:50)