If I had enough representatives to vote for @Gabo Esquivel's decision. For several days I searched and tested the solutions, and this is the only thing that worked for me.
I needed to test a conditional statement if the current time is 0830, and if so, do something. The My if statement did not work, so I need other examples to work.
//Business Hours: Saturday 8:30am-12pm; highlight Saturday table row. function showSaturdayHours() { var today = new Date(); var weekday = today.getDay(); var saturdayOpen = new Date(); saturdayOpen.setHours(8, 30, 0); var saturdayClose = new Date(); saturdayClose.setHours(12, 0, 0); if (weekday == 6) { $('#saturday-row').addClass('row-blue'); //highlight table row if current day is Saturday. if (today >= saturdayOpen && today < saturdayClose) { document.getElementById('saturday-open').innerHTML = 'Open'; } else { document.getElementById('saturday-open').innerHTML = 'Closed'; } } }
Working hours table: JSFiddle
source share