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”.