{"uid":"cap_bRuQb_Yl5P0QdcxSDlU9J","slug":"iso-date-difference-18c52e2d","name":"ISO Date Difference","description":"Difference between two dates. Use for aging tickets, session duration, or SLA breach math. Returns the delta between two ISO timestamps in structured units. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.","url":"https://api.delx.ai/api/v1/x402/date-diff","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"end":{"type":"string","format":"date-time","description":"Ending ISO-8601 timestamp for a date range."},"start":{"type":"string","format":"date-time","description":"Starting ISO-8601 timestamp for a date range."}}},"responseSchema":{"type":"json","example":{"end":"2026-08-10T12:00:00+00:00","days":6,"start":"2026-08-04T12:00:00+00:00","schema":"delx/date-diff/v1","seconds":518400}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WP_ifw_Xr9z3AvOAdrRi6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the structured time delta between two ISO-8601 timestamps, returning the difference in discrete units like days, hours, minutes, and seconds.","exampleAgentPrompt":"How many days, hours, and minutes elapsed between 2024-01-15T08:30:00Z and 2024-03-22T17:45:00Z?","exampleUseCases":[{"title":"SLA breach detection for support tickets","prompt":"Our ticket was opened on 2024-06-01T09:00:00Z and closed on 2024-06-03T18:30:00Z — how long did that take in structured units so I can check if we breached our 48-hour SLA?"},{"title":"User session duration measurement","prompt":"A user logged in at 2024-11-10T14:22:00Z and logged out at 2024-11-10T16:05:47Z — what was the total session duration broken down into hours and minutes?"},{"title":"Invoice aging for accounts receivable","prompt":"An invoice was issued on 2024-09-01T00:00:00Z and today is 2024-10-15T00:00:00Z — how many days old is it so I can flag it as overdue?"}],"resultDescription":"A structured JSON object containing the computed difference between the two ISO timestamps, broken into discrete units such as total days, hours, minutes, and seconds — suitable for direct use in SLA calculations, aging reports, and duration displays without further parsing.","failureModes":["Invalid ISO-8601 format for start or end — returns a structured validation error (not billed)","End timestamp earlier than start timestamp — may return negative delta or an error","Missing required start or end field — returns a structured validation error (not billed)","Malformed JSON body — returns a structured validation error (not billed)","Payment failure via x402 — call is not executed"],"whenToPreferThis":"Prefer this endpoint when you need a deterministic, structured breakdown of the time delta between two ISO timestamps without writing date math logic yourself. Ideal for agents handling ticket aging, SLA enforcement, session duration reporting, or any workflow where the elapsed time between two precise moments must be decomposed into named units (days, hours, minutes, seconds). Particularly useful in serverless or no-code agent pipelines where shipping a date library is impractical. At $0.001 USDC per call with no API key or subscription required, it suits high-frequency, low-overhead date arithmetic in agentic systems.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:44:12.754Z","isFirstParty":false}