date_math
Perform timezone-aware date arithmetic: add or subtract durations with DST-safe days, or calculate differences between datetimes in different zones.
Instructions
Timezone-aware date arithmetic: add or subtract a duration to a datetime (days are calendar-based and DST-safe; hours and minutes are absolute), or compute the difference between two datetimes that may be in different zones.
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": {
"datetime": "<datetime>",
"timezone": "<timezone>",
"operation": "<operation>"
},
"name": "date_math"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datetime | Yes | Base datetime: ISO 8601 or natural language. | |
| timezone | Yes | IANA timezone the base datetime is in. | |
| operation | Yes | What to compute: { type:'add', amount, unit } to add/subtract a duration, or { type:'diff', to_datetime, to_timezone? } for the difference between two datetimes. |