Wanted to bring this one home for everyone here.
To complete the indicators I needed to exclude the company holidays and weekends. This was being achieved through a manual entry above, but I wanted it scripted.
I worked with one of great folks at Esri, Paul Barker who gave me a direction to go, then took what I made and actually made it work. I was using normal dates, not starting at month 0, and attempting a for loop, but his 'while' statement looks so great, and is easier to get my head around.
What it does: Divides production / working days, by removing non-working days to create project velocity, and shows you the remaining days to the deadline. To create the actual velocity, just flip flip the initial variables.
// array of holiday dates (note Month is a zero indexed value)
var holiDates = [
Date(2023, 0, 2),
Date(2023, 3, 7),
Date(2023, 4, 29),
Date(2023, 6, 4),
Date(2023, 10, 23),
Date(2023, 10, 24),
Date(2023, 11, 25),
Date(2023, 11, 26)
];
//set up initial variables
var todayDate = Today();
var counter = 0;
var endDate = Date(2023, 6, 15); // End date of project
//iterate over the range and count the work days
while (todayDate <= endDate) {
var currWeekDay = Weekday(todayDate);
var isWorkDay = currWeekDay > 0 && currWeekDay < 6;
var isHoliday = Includes(holiDates, todayDate);
// check that its a work day and not a holiday and if so count it
if (isWorkDay && !isHoliday) {
counter += 1;
}
todayDate = DateAdd(todayDate, 1, "days");
}
// Starting total project miles
var startMiles = 112.3
// Actual total production to date
var ytdProduction = $Datapoint["sum_Miles"]
var requiredVelocity = (startMiles - ytdProduction) / counter;
return {
//textColor:'',
//backgroundColor:'',
topText: (counter)+" "+"Work Days Remain",
topTextColor: 'red',
topTextOutlineColor: 'red',
topTextMaxSize: 'medium',
middleText: Round (requiredVelocity,3)+"mi",
middleTextColor: 'orange',
middleTextOutlineColor: 'red',
middleTextMaxSize: 'medium',
//bottomText: '',
//bottomTextColor: '',
//bottomTextOutlineColor: '',
//bottomTextMaxSize: 'small',
//iconName:'',
iconAlign:'left',
iconColor:'Orange',
iconOutlineColor:'red',
//noValue:false,
//attributes: {
// attribute1: '',
// attribute2: ''
// }
}

Thanks Paul!