Date calculator: add/subtract durations, days between dates
util_date_calcExact date math so the agent does not miscount: add or subtract a duration ("3 months, 2 days", "-10d", "2w", "15 business days", ISO "P1Y2M10D", hours/minutes) to a date, and/or get the difference to another date as calendar years/months/days plus total days, weeks, hours, seconds and Mon–Fri business days. Every date comes back with weekday, ISO week, day of year, quarter, leap year, days in month and unix time. Month-end safe (Jan 31 + 1 month = Feb 28/29). Use for deadlines, ages, due dates, SLAs, countdowns. UTC. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.
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": "util_date_calc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Optional second date to measure the difference to | |
| add | No | Duration to add, e.g. '3 months, 2 days', '2w', '15 business days', '36h', 'P1Y2M10D' | |
| date | No | Start date: YYYY-MM-DD, ISO date-time, unix seconds/ms, 'today' (default) or 'now' | |
| subtract | No | Duration to subtract (same format as add) |