I want to check if current time is earlier than the time I've specified(for this example 8:20AM), so I am doing something like this:
const _MS_IN_HOUR = 1000 * 60 * 60;
const _MS_IN_MIN = 1000 * 60;
const now = new Date();
const hm = +now / _MS_IN_MIN;
if (hm <= (8 * _MS_IN_HOUR + 20 * _MS_IN_MIN)) {
console.log("something");
}
but it's not working.