time_date_math
Date calculator — Add or subtract days, weeks, months, years or hours from a date, or measure the gap between two dates (days, weeks, calendar breakdown, weekdays). Also returns weekday, ISO week, day of year and quarter. Pass ?date=, then ?add= or ?to=. Price: $0.001 USDC (Base, via x402).
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": {
"add": "<add>",
"to": "<to>"
},
"name": "time_date_math"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | second date to measure the gap to | |
| add | Yes | e.g. 90d, 3w, 6m, 1y, -2d (comma-separate to combine) | |
| date | No | start date YYYY-MM-DD, default today |