Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Business Days Calculator API

Count working days between two dates, or add/subtract working days to a date, skipping weekends and an optional holiday list.

POST /api/v1/tools/business-days-calculatorMCP business_days_calculatorTime & Date

Count working days between two dates, or add business days to a date, skipping weekends (any days you choose) and your own list of public holidays.

Input

Send these as a JSON object. Unknown fields are rejected.

mode
count: working days from start to end. add: move start by days working days (negative to go back). (string, one of count, add, default "count")
start
Start date as YYYY-MM-DD. (string, up to 10 characters, required)
end
For count: end date as YYYY-MM-DD (dates are swapped if end is earlier). (string, up to 10 characters)
days
For add: whole number of working days to add (negative to subtract), up to ±50,000. The start date itself is never counted. (integer, -50000 to 50000)
weekend
Weekend days as comma-separated numbers, 0 = Sunday … 6 = Saturday. Default "0,6" (Saturday and Sunday); "5,6" for Friday–Saturday. (string, up to 20 characters, default "0,6")
holidays
Holidays to skip, one per line as YYYY-MM-DD optionally followed by a name, e.g. "2026-12-25 Christmas Day". (string, up to 20000 characters)
includeStart
For count: include the start date. (boolean, default true)
includeEnd
For count: include the end date. (boolean, default true)
listExcluded
Include the list of skipped weekend days and holidays in the response. (boolean, default false)
curl https://pithlab.com/api/v1/tools/business-days-calculator \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"mode":"count","start":"2026-12-01","end":"2026-12-31","holidays":"2026-12-25 Christmas Day\n2026-12-28 Boxing Day (substitute)"}'