Date calculations can differ because people count the start date, end date, weekends, and holidays differently. State the counting convention before comparing results.
Elapsed versus working days
Elapsed days count calendar time. Working days usually exclude weekends and may exclude a holiday list. A Friday-to-Monday interval can be three elapsed days but one weekday gap depending on inclusivity.
Inclusive and exclusive counting
An inclusive range counts both endpoints when they qualify. An exclusive elapsed interval measures the time between them. Neither is universally correct; the contract, payroll rule, or project definition controls.
Holidays need a calendar
A weekday-only result is not a country-specific business-day result. Add the correct holiday calendar, region, observed-day rule, and company shutdown dates when the deadline depends on them.
Audit the output
Test a one-day range, a weekend crossing, a holiday, and a reversed date. These edge cases expose off-by-one assumptions faster than a typical long range.
Sources
The figures and rules in this guide are checked against:
- Federal Holidays — U.S. Office of Personnel Management
- UK bank holidays — GOV.UK
- Rule 6. Computing and Extending Time (Federal Rules of Civil Procedure) — Cornell Law School, Legal Information Institute
- Federal Reserve Financial Services Holiday Schedules — Federal Reserve Financial Services
