I\'m trying to get this Javascript to do something if the day of the week matches any of the days listed in my statement, as well as restricting it to between 17:00 and 19:0
You need to use dayOfWeek but you can also limit the amount of checks you need to do....
dayOfWeek
var d = new Date(); var dayOfWeek = d.getDay(); // 0 = Sunday var hour = d.getHours(); if ( (dayOfWeek >= 4 && dayOfWeek <= 6) && (hour>=17 && hour < 19)) { // do stuff } else { // doo other stuff }