Hello,
I need to create an indicator in Dashboard that displays the number of remaining days between a start date and the end date, that also excludes weekends and holidays in the calculation.
I saw this script
var remaindays = DateDiff($feature.endDate, Today(), 'days');
return when (days>30, "on schedule",
days>=0, "nearly due",
"overdue");
but I am struggling to find a way to add the exclusion. I believe that somehow I will need to add +1 or +2 whether there are a Saturday and/or a Sunday in between the 2 dates, and a list of holidays, into the script.
Any help will be greatly appreciated 🙂