Date and business-day calculator
date_calcCalculate days or business days between dates, add or subtract days while skipping weekends and country holidays, and get date facts such as weekday, ISO week, quarter, and leap year.
Instructions
Date math agents get wrong: days and business days between two dates (skipping weekends and a country's nationwide public holidays, looked up for the start and end year), add or subtract days or business days, and facts about a date (weekday, ISO week, quarter, day of year, leap year). Costs $0.001 per call.
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": {
"op": "<op>",
"date": "<date>"
},
"name": "date_calc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | "diff", "add_days", "add_business_days" or "info". | |
| date | Yes | Start date, YYYY-MM-DD. | |
| days | No | Days to add (negative to subtract). | |
| country | No | Skip this country's public holidays in business-day math, e.g. "US". | |
| end_date | No | End date for diff, YYYY-MM-DD. |