networkdays
Number of working days between two dates.
Syntax
Section titled “Syntax”v = networkdays(start_date, end_date, holidays)Description
Section titled “Description”Returns the count of weekdays (Mon–Fri) in the range [start_date, end_date], excluding any dates listed in the optional holidays vector. Both endpoints are inclusive.
Example
Section titled “Example”networkdays(date(2026,1,1), date(2026,1,31)) % 22