Allina,
var sTime = new Date();
var hours = sTime.getHours();
var minutes = sTime.getMinutes();
var _doom = 9;
if (hours >= 2 && sTime < new Date(sTime.getFullYear(), sTime.getMonth(), sTime.getDate(), 5, 30)) {
_doom = 3;
}
if (hours >= 8 && sTime < new Date(sTime.getFullYear(), sTime.getMonth(), sTime.getDate(), 11, 30)) {
_doom = 5;
}
console.log(_doom);