Isn’t the time obtained from 0-6? Is the condition set to case1? If it is not the condition, where is it
var day = new Date().getDay(); returns 1 on Monday and 2 on Tuesday
var day = new Date().getDay(); returns 1 on Monday and 2 on Tuesday