Date Calc
date_calcCalendar-correct date arithmetic in any IANA zone: add or subtract durations (ISO 8601 or plain English, months clamp to month end so Jan 31 + 1 month = Feb 28/29), exact difference between two dates (years / months / days breakdown plus total days / weeks / hours / seconds and ISO 8601), start / end of day / week / month / quarter / year, the Nth weekday of a month ("4th Thursday of November") and age / countdown. DST-aware. Offline. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/date-calc
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": "date_calc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | For nthWeekday: 1..5, or -1 for last | |
| op | No | add | |
| to | No | Second date for op=diff | |
| tz | No | UTC | |
| date | No | Base date / time (ISO 8601, epoch, or text like "2026-03-01 09:00"); default now | |
| unit | No | For startOf / endOf | day |
| clamp | No | Clamp month / year additions to the last valid day (false = overflow like PHP / JavaScript) | |
| weekday | No | For nthWeekday | |
| duration | No | For add / subtract: P1M2D, "3 weeks 2 days", "-90 minutes" | |
| weekStart | No | monday |