Business Days Difference Arithmetic: Excluding Weekends and Holidays
Calculating business days difference (working days) between two dates requires subtracting weekends and observed holidays from the total calendar days. A calendar day calculation is simple: $$D_{\text{calendar}} = T_{\text{end}} - T_{\text{start}}$$. However, business day calculations must parse the date range day-by-day or apply week-based mathematics to remove non-working days.
To calculate business days difference between two dates, we determine the number of full weeks elapsed: $$W = \lfloor D_{\text{calendar}} / 7 \rfloor$$. Each full week contains exactly 2 weekend days (in standard systems), representing $$W \times 2$$ weekend days. We then analyze the remaining fractional week days, checking if their weekday indices fall on Saturday (6) or Sunday (0) to adjust the total weekend count before subtracting holidays.