Hi, i’m trying to run this code which used to work well on the arbitrary JS component by Pragmaflow, but it returns false instead of true even though it’s 11am. any idea what could be wrong with it?
var currentTime = new Date();
var dayOfWeek = currentTime.getDay();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();
var isOpen = dayOfWeek >= 1 && dayOfWeek <= 7 && hours >= 7 && (hours < 17 || (hours === 17 && minutes <= 30));
return isOpen ? true : false;