calculate_time
Add or subtract time from dates using Gregorian, lunar, or festival-based calculations to determine future or past dates with timezone support.
Instructions
Add or subtract time from a date. Supports Gregorian mode, Lunar mode, and anchor mode (calculate relative to a named festival).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "calculate_time"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Calculation mode. Defaults to 'gregorian'. | |
| base_date | No | Base date in ISO format (YYYY-MM-DD or full ISO 8601). Required for gregorian/lunar modes. | |
| timezone | No | IANA timezone for the base date. Defaults to UTC. | |
| years | No | Years to add (negative to subtract) | |
| months | No | Months to add (negative to subtract) | |
| days | No | Days to add (negative to subtract) | |
| hours | No | Hours to add (negative to subtract) | |
| minutes | No | Minutes to add (negative to subtract) | |
| festival | No | Festival name for anchor mode (e.g. '春节', 'Christmas', 'Thanksgiving') | |
| festival_year | No | Year to resolve festival date for anchor mode |