I would like to make a code that takes hour and minute so that I can work with a scheduling schedule for the execution of an action, for example:
var inserirProgramAtual = document.getElementById("CBNestudio");
if ((new Date().getDay() > 0) && (new Date().getDay() < 6)) {
if (new Date().getHours() >= 5 && new Date().getHours() <= 9) {
inserirProgramAtual.innerHTML = '
<span>Jornal da manhã</span>
'
} else if (new Date().getHours() >= 9 && (new Date().getHours() <= 10)) {
inserirProgramAtual.innerHTML = '
<span>Programa qualquer</span>
'
I managed to pick up time normally, which is 9 o'clock, but what could I do to catch 30 minutes? For example, I want you to take action at 9:10 or 9:30.