Javascript has built-in function for time where
var date = new Date();
d.getHours() //gets the hour in integer 0-23
d.getMinutes() //gets the minute in integer 0-59
I would like function (e.g. A()) to run between 0:35 and 4:35
Is this possible to do using just simple logic operation (&&, ||)?
I don’t think it is possible, but I wanted to know the elegant way to implement it.
Technically it’s possible, but you are absolutely right in that this is not an elegant solution: