Count working days, workdays and PTO
count_business_daysUse this when the user asks how many working days, business days, workdays, office days or PTO days there are between two dates, or for a statutory holiday count, for example "how many working days between 14 July and 18 August in Germany?" or "how many working days are left in December in Ontario?". Pass the country code, the start and end dates as YYYY-MM-DD, and a region when the user names a state or province. Both dates count by default (see includeStartDate and includeEndDate). Weekends are Saturday and Sunday unless weekendDays is set. Returns the business, calendar and weekend day counts, the holidays on working days, those only some regions keep, and the conventions used. For exchange trading days pass calendars, such as ["NYSE"], ["LSE"], ["JPX"] or ["TARGET2"]. Do not use it for hours, time zones, or date differences that do not exclude weekends and holidays.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"country": "<country>",
"startDate": "<startDate>",
"endDate": "<endDate>"
},
"name": "count_business_days"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | State, province or nation within the country, as a subdivision code such as DE-BY or BY (Bavaria), GB-SCT (Scotland), US-CA or AU-NSW. Optional. | |
| country | Yes | Two-letter ISO 3166-1 country code whose holidays apply, such as US, GB, DE, AU or VN. | |
| endDate | Yes | Last date of the range, YYYY-MM-DD. Not before startDate. | |
| calendars | No | Holiday calendars to apply; a day is off when any of them closes it. "public" (the default) is the country's public holidays. NYSE is the New York Stock Exchange (also Nasdaq), FED the Federal Reserve and Fedwire (which DTC settlement follows), LSE the London Stock Exchange, JPX the Japan Exchange Group, TARGET2 the euro payment system. For a settlement date join the market and payment calendars, such as ["NYSE", "FED"] for a US T+1 settlement or ["TARGET2", "FED"] for EUR/USD spot. Optional. | |
| startDate | Yes | First date of the range, YYYY-MM-DD. | |
| weekendDays | No | Days of the week that are not working days. Default: saturday and sunday. Use friday and saturday where that is the weekend. | |
| includeEndDate | No | Count endDate when it is a working day. Default true. | |
| includeStartDate | No | Count startDate when it is a working day. Default true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| region | No | ||
| source | Yes | ||
| country | Yes | ||
| endDate | Yes | ||
| weekend | No | ||
| calendars | No | The calendars applied, when the call named calendars | |
| startDate | Yes | ||
| conventions | Yes | ||
| weekendDays | Yes | ||
| businessDays | Yes | ||
| calendarDays | Yes | ||
| includesEndDate | No | ||
| includesStartDate | No | ||
| holidaysOnWorkdays | Yes | ||
| regionalHolidaysNote | No | ||
| regionalHolidaysNotCounted | No |