I recently received a request for assistance with my JavaScript date extensions, DP_DateExtensions. In part it says:
I need to simulate the MS Excel networkdays() function. Excel would count 10th Jan 2013 midnight to 15th Jan 2013 midnight as 4 working days (6 days in total) but DP_DateExtension.js does not count the 10th so outputs 3 working days (5 total).
The Excel NetworkDays() function returns “business days” (removing Saturday and Sunday and optionally holidays from the calculation). In this case passing the function January 10th (a Thursday) to January 15 (a Tuesday) results in “4”. This makes it clear that Excel is doing this calculation inclusively by date and obviously not from “midnight to midnight”.

Spent way too long figuring this out today and thought I’d do an entry so that I’d remember it. To set the stage my team manages emergency situations and restoration of service for over 800 enterprise applications. As you might expect we have a SharePoint list of these applications with basic information about them.