var date = new Date(); var dn = date.getDay(); var hour = date.getHours(); console.log((hour >= 12 && hour <= 15 && dn < 6) ? 'показать' : 'фиг вам');