x420_util_date-math
Date math: Add or subtract a duration ("2d", "-3h", "1w 2d", "90m", "6mo", "1y") to a date, difference between two dates, exact age in years/months/days, weekday with ISO week and day-of-year, or Monday-to-Friday business days between two dates. UTC, deterministic. Source: computation. Not professional, legal, insurance, engineering, medical, financial or tax advice. Price: $0.001 USDC per call (x402 on Base). This hosted tool does NOT pay and does NOT return the deliverable: it validates the input and returns payment instructions (pay_to, network, price and the x402 URL to pay at). GET the url; read PAYMENT-REQUIRED from the 402; retry with PAYMENT-SIGNATURE (x402 v2). Or run the local x420-mcp server with your own wallet key to pay automatically. Deliverable once paid: JSON per op: result / ms,days,human / years,months,days / weekday,iso_week / business_days.
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": {
"duration": "<duration>"
},
"name": "x420_util_date-math"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | add (default), diff, age, weekday or business_days | |
| date | No | ISO 8601 date or 'now' (default now) | |
| date2 | No | for diff, age, business_days: the second date (default now) | |
| duration | Yes | for add: e.g. 2d, -3h, 1w 2d, 90m, 6mo, 1y |