for NETWORKDAYS, WORKDAY
WORKDAY's implementation contains calculation error. in pastDaysOfWeek(), if start equals end, it returns negative number but it should be positive.
This method calculate how many day of week (e.g. Sunday) between start to end.
It should return 1 but original implementation return -1;
NETWORKDAYS also calculate incorrectly when the given duration are all holidays, e.g. =NETWORKDAYS(DATE(2013,6,1), DATE(2013,6,1))
Make original algorithm more readable.
Always return a positive day count when counting Staturday, Sunday, and specified holidays. Because original caller method doesn't expect pastDaysOfWeek() and calculateNonWeekendHolidays() return negative value.