var horarios = [
{day: 0, start: 0, end: 0 }, // domingo (no abre)
{day: 1, start: 09*60*60, end: 12*60*60}, // lunes (09:00:00-12:00:00)
{day: 1, start: 14*60*60, end: 22*60*60}, // lunes (14:00:00-22:00:00)
{day: 2, start: 15*60*60, end: (23*60 + 30)*60}, // martes (15:00:00-23:30:00)
{day: 3, start: 15*60*60, end: (23*60 + 30)*60}, // miércoles (15:00:00-23:30:00)
{day: 4, start: 15*60*60, end: (23*60 + 30)*60}, // jueves (15:00:00-23:30:00)
{day: 5, start: 15*60*60, end: (23*60 + 30)*60}, // viernes (15:00:00-23:30:00)
{day: 6, start: 20*60*60, end: (23*60 + 59)*60 + 59}, // sábado (20:00:00-23:59:59)
];
var weekdays = ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'];
function comprobarHora(fecha){
var day = fecha.getDay();
var time = (fecha.getHours() * 60 + fecha.getMinutes())*60 + fecha.getSeconds();
console.log(weekdays[day] + ' ' +
fecha.toLocaleTimeString() +
(horarios.some(t=> t.day===day && time>=t.start && time<t.end) ? ': abierto' : ': cerrado'));
}
var d = new Date(); // Día y hora actual
comprobarHora(d);
d = new Date(2017, 11, 6, 15, 38, 0); // Miércoles 15:38
comprobarHora(d);
d = new Date(2017, 11, 9, 15, 38, 0); // Sábado 15:38
comprobarHora(d);
d = new Date(2017, 11, 9, 23, 59, 58); // Sábado 23:59:58
comprobarHora(d);
d = new Date(2017, 11, 18, 08, 52, 0); // Lunes 08:52:00
comprobarHora(d);
d = new Date(2017, 11, 18, 11, 0, 0); // Lunes 11:00:00
comprobarHora(d);
d = new Date(2017, 11, 18, 13, 0, 0); // Lunes 13:00:00
comprobarHora(d);
d = new Date(2017, 11, 18, 17, 0, 0); // Lunes 17:00:00
comprobarHora(d);