Given a start date, an end date (inclusive), and a set of holiday dates, compute the number of working days.
A working day is a date that:
startDate
: string in
YYYY-MM-DD
endDate
: string in
YYYY-MM-DD
(guaranteed
endDate >= startDate
)
holidays
: list of distinct date strings in
YYYY-MM-DD
[startDate, endDate]
.
startDate = 2026-12-24
endDate = 2026-12-28
holidays = [2026-12-25]
Dates:
Output: 2