31trust / 100
Calculators Date Difference Calculator
by AgentTools in Productivity & SaaS
x402 APIFailing, checked 3 h ago
Count the total days between two dates, plus the breakdown in weeks and days and in calendar years, months and days. Use this when an agent needs to days, weeks and calendar time between two dates.
GET https://agenttools-hub.vercel.app/api/v1/calculators/date-difference-calculator
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 20.0%
- Response time
- 133 ms typical, 133 ms slowest 5%
- Last check
- 3 h ago: Expected HTTP 402, got 308
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://agenttools-hub.vercel.app/api/v1/calculators/date-difference-calculator?end=2024-12-31&start=2024-01-01"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagenttools-hub.vercel.app%2Fapi%2Fv1%2Fcalculators%2Fdate-difference-calculator
const res = await pay("https://agenttools-hub.vercel.app/api/v1/calculators/date-difference-calculator?end=2024-12-31&start=2024-01-01");
console.log(await res.json());Example input
{
"end": "2024-12-31",
"start": "2024-01-01"
}Example output
{
"result": {
"answer": "365 days",
"answerLabel": "2024-01-01 → 2024-12-31",
"details": [
{
"label": "Weeks + days",
"value": "52 weeks, 1 days"
},
{
"label": "Calendar breakdown",
"value": "11 months, 30 days"
},
{
"label": "Total hours",
"value": "8,760"
}
],
"steps": [
"Both dates converted to UTC timestamps",
"(2024-12-31 − 2024-01-01) ÷ 86,400 = 365 days"
],
"value": 365
},
"tool": "date-difference-calculator"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Expected HTTP 402, got 308 | 308 | 18 ms | - |
| 7 h ago | Expected HTTP 402, got 308 | 308 | 82 ms | - |
| 11 h ago | Expected HTTP 402, got 308 | 308 | 106 ms | - |
| 15 h ago | Expected HTTP 402, got 308 | 308 | 189 ms | - |
| 19 h ago | Expected HTTP 402, got 308 | 308 | 74 ms | - |
| 23 h ago | Expected HTTP 402, got 308 | 308 | 64 ms | - |
| 27 h ago | Expected HTTP 402, got 308 | 308 | 97 ms | - |
| 30 h ago | Expected HTTP 402, got 308 | 308 | 57 ms | - |
| 33 h ago | Passed | 402 | 212 ms | $0.002 |
| 39 h ago | Passed | 402 | 133 ms | $0.002 |