Getting the remaining days of the current week
First of all, never calculate dates yourself. If possible, always defer to a library that's built by people who know more about dates, who keeps rules up to date, and has more eyes on it to spot bugs than you and your code. For that, I forward you to moment.js. With that, calculating the remaining week days would be as simple as finding today's day number with day and subtracting it from 6 (Saturday's number).

const daysUntilWeekend = 6 - moment().day()


For work days (week days sans holidays) you simply need at least 3 moment instances, the first representing the start of the week, the second representing the end of the week, and the third (or more) representing the holidays. Then you can use isBetween to check if any of your holiday dates fall between the first two, and subtract how many match from 6 accordingly.

// May fail when today's saturday or sunday. Adjust this code accordingly.
const start = moment().day(1).startOf('day')
const end = moment().day(6).startOf('day')
const holidayMoments = [moment(), moment()] // Holiday dates in moments
const holidays = holidayMoments.filter(h =&gt; h.isBetween(start, end)).length
const today = moment().day()
const remainingWorkDays = 6 - (today + holidays)