Networkdays() function returns the number of working days (5 days working week) between two given dates.
If you want to "flag" the dates as working or not an customise the list per country, at my knowledge, you can't avoid using an external file.
What i have done when i tried to flag working dates for an application and customise this list with the Greek holidays, was to use an external xlsx file which was the result set of the calculation of working days i did on SQL Server.
I am using own calendar for this task. I create a calendar in script, than create an inline table with all holidays dates (formated as DM). Than connect to my generated calendar and create flag for holiday. If you need than you can load only rows flaged as holiday and you will have field with all holidays for period for which you create the calendar. It is even possible to take in account Eastern holiday (if you have it in your country).
I don't know how you could avoid using an external file. Every country has different holidays and most companies have a slightly different list of holidays. You would have to build a list of holidays for your environment.