I have 2 strings, that have the minute and hour that a function needs to occur at.
I want to check, if the minute and hour which are specified in string format, and from my database are within 5 minutes of the current time, call this function.
My original thought was something like:
(today.minute is the current minute)
today.minute:
minute = "55"
hour = "14"
var today = new Date();
var time = today.getMinutes(), today.getHours()
if (today.getMinutes() - 5 == minute) {
myFunc()
}
But that isn't going to work, because I need the hour and minute - 5 minutes... how can I do this?