I use the following Script that is triggered on all weekdays:
function shouldRunTrigger() {
var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
var date = new Date();
var day = days[date.getDay()];
if ((day === "Sat") || (day === "Sun")) {
return false;
}
return true;
}
function myTrigger() {
if (!shouldRunTrigger()) return;
// trigger code here
}
I would like exclude National holidays like 26th Jan, 15th Aug & 02nd Oct of each year, any help on how to acheive this?