{"uid":"cap_E4pw6A4z7kL3YHSO-pnTi","slug":"swift-bot-labs-toolbox-time-difference-calculator-2b799239","name":"Swift Bot Labs Toolbox – Time Difference Calculator","description":"62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.","url":"https://x402-toolbox.swiftbotlab.workers.dev/v1/time/diff?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["start"],"properties":{"tz":{"type":"string"},"end":{"type":"string"},"start":{"type":"string"}},"additionalProperties":false},"discoverable":{"type":"boolean"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"time-diff","result":{"days":278,"human":"9 months, 12 days","seconds":24019200,"calendar":{"days":12,"years":0,"months":9},"businessDays":198}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_owAyFQDX8a1HSK-65bsjh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the difference between two timestamps, returning total seconds, days, business days, and a human-readable breakdown (years, months, days).","exampleAgentPrompt":"How many days and business days are between January 15, 2024 and November 19, 2024? Give me the total seconds, a human-readable breakdown, and the calendar split by years, months, and days.","exampleUseCases":[{"title":"Contract deadline countdown","prompt":"How many business days are left between today, June 1 2025, and the contract deadline on August 29 2025? Also give me the total days and a plain English summary like '2 months, 28 days'."},{"title":"Project duration reporting","prompt":"My project started on March 3 2024 and finished on December 31 2024 — how long did that take in total seconds, calendar months and days, and how many of those were business days?"},{"title":"Age or anniversary calculation","prompt":"How many days, months, and years is it from my company's founding date of July 4 2015 to today, July 4 2025? Include the business day count too."}],"resultDescription":"Returns a JSON object with: ok (boolean), tool name ('time-diff'), and a result object containing total seconds, total days, business days, a human-readable string (e.g. '9 months, 12 days'), and a calendar object broken down into years, months, and days.","failureModes":["Missing required 'start' query parameter returns an error","Malformed or unparseable date string causes a failure response","Invalid timezone string (tz) may produce incorrect results or an error","End date before start date may return negative or zero values"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, pay-per-call time difference computation with no API key setup, especially when you need business-day counts and a human-readable breakdown alongside raw seconds and days. Prefer it over custom date math when you want a reliable, pre-built utility that handles timezone offsets and calendar-aware month/day decomposition.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:36.884Z","isFirstParty":false,"canonicalSlug":"swift-bot-labs-toolbox-time-difference-calculator-2b799239"}