Hello I'm trying to program so that a msg will be given only from monday to friday between 8 and 15 o'clock.
The passing on with "if" comands in workdays I got it.
Now I do not know how to do that with the time interval.
I've already got the time, but how do I compare these? Can someone help me?
Code is below
Thank you
Best regards,
Agrotar
var weekday = new Date().getDay();
var day;
var time = new Date().getTime();
if(weekday == 1) day = 'Montag';
if(weekday == 2) day = 'Dienstag';
if(weekday == 3) day = 'Mittwoch';
if(weekday == 4) day = 'Donnerstag';
if(weekday == 5) day = 'Freitag';
if (weekday == 1){
return msg;
}
if (weekday == 2){
return msg;
}
if (weekday == 3){
return msg;
}
if (weekday == 4){
return msg;
}
if (weekday == 5){
return msg;
}