Days between two dates
days_betweenCount calendar days from start to end. Use when the user asks how many days are between two dates. Both are YYYY-MM-DD. include_start and include_end default to false, so the count is the dates strictly after start and strictly before end: 2024-02-28 to 2024-03-01 is 1 in a leap year (29 February) and 0 in a common year. Set both to true to count every date from start through end (3 in that leap-year span, 2 otherwise). The count is negative when end is before start. The same day is 0 unless both ends are included, which is 1. The result is that count and nothing else.
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": {
"start": "<start>",
"end": "<end>"
},
"name": "days_between"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Second date, YYYY-MM-DD. Also accepted: YYYY-MM-DDTHH:MM, YYYY-MM-DDTHH:MM:SSZ, YYYY/MM/DD, or YYYYMMDD. | |
| start | Yes | First date, YYYY-MM-DD. Also accepted: YYYY-MM-DDTHH:MM, YYYY-MM-DDTHH:MM:SSZ, YYYY/MM/DD, or YYYYMMDD. | |
| include_end | No | Count end. Default false. | |
| include_start | No | Count start. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | ||
| error | No | ||
| candidates | No | ||
| zone_notes | No | Present when a city argument was a time zone abbreviation or fixed offset such as EST or UTC+2. Says which time zone it was read as, and what else the abbreviation can mean. | |
| alternatives | No | Other cities that matched the same name, after the best-ranked city was chosen. The order is the site search order: match, then priority, then population. |