### Title

Calculating work days between two dates

### Post

I have a few questions in regards to calculating work days between two dates. I followed the instructions posted in the following link and it doesn't quite work as I would expect it to.

First, say I have the start date on a monday and end date on a friday the returned calculation is 4 but my logic says the end date is inclusive therefor it should return 5. A quick "+ 1" at the end of the calculation fixed this but I'm worried I'm missing something. I tried understanding the entire calculation but can't seem to wrap my head around this one which is why I'm worried adding a + 1 arbitrarily at the end isn't smart.

Second, the holiday exclusion assumes someone will never put a holiday as a start date but that doesn't mean a user may not mistakenly do so ... is there a way to fix this or that's the limitation of this current calculation?

The complex calculation (it used to have a bug in it but I helped FileMaker Inc find and fix it), does a kind of table lookup of data listed directly as part of the calculation. The + 1 adjustment to make the interval inclusive would seem exactly correct.

I don't think there would be any trouble getting the correct count if a user specifies a holiday date as one or both of the dates in your interval. The calculation should still compute the number of week days and then subtract out the number of holiday dates from that total.

BTW, i also know of an alternative approach: If you put all the dates of the calendar in a table and mark specific dates as "closed" whether because they are weekend dates or because it is a holiday, you can simply count all records on the interval that are not marked as "closed".