{"uid":"cap_QruHae4MDseNiD6E7UOq-","slug":"fastx402-relative-time-formatter-e90ba6df","name":"FastX402 Relative Time Formatter","description":"146 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.","url":"https://fastx402.tools/relative-time?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"],"type":"string"},"queryParams":{"type":"object","required":["date","base"],"properties":{"base":{"type":"string","description":"The reference date (usually now), ISO 8601"},"date":{"type":"string","description":"The date to describe, ISO 8601"},"locale":{"enum":["en","tr","de","fr","es"],"type":"string","description":"en, tr, de, fr or es (default en)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"text":{"type":"string"},"strict":{"type":"string"},"seconds":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"text":"about 4 hours ago","strict":"4 hours ago","seconds":-12600}},"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_9mx0XXO2PLacX_yXWX0EC","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":"Converts two ISO 8601 dates into a human-friendly relative time string (e.g. 'about 3 hours ago') in English, Turkish, German, French, or Spanish, along with the exact difference in seconds.","exampleAgentPrompt":"Can you tell me how long ago 2024-11-15T09:00:00Z was compared to now (2025-05-20T14:00:00Z) — I want the friendly phrasing in French, like 'il y a 6 mois'.","exampleUseCases":[{"title":"Localized timestamp for user notification","prompt":"I need to show users when their last login was — the login time was 2025-05-18T08:30:00Z and now is 2025-05-20T14:15:00Z. Can you give me the friendly German phrase for that, like '2 Tage zuvor'?"},{"title":"Turkish relative time for social post","prompt":"My article was published on 2025-04-01T12:00:00Z and today is 2025-05-20T12:00:00Z — what's the relative time in Turkish so I can show '49 gün önce' or similar on the page?"},{"title":"English elapsed time for audit log display","prompt":"How would you phrase the time between 2025-05-20T10:00:00Z and 2025-05-20T13:30:00Z in plain English for a UI label — something like 'about 3 hours ago'?"}],"resultDescription":"Returns a JSON object with three fields: 'text' (casual friendly phrasing like 'about 4 hours ago'), 'strict' (precise phrasing like '4 hours ago'), and 'seconds' (exact signed integer difference between the two dates, negative if date is before base).","failureModes":["Missing required 'date' or 'base' query parameters returns an error","Invalid ISO 8601 date strings cause a parse error","Unsupported locale value (outside en/tr/de/fr/es) returns an error","Network timeout or payment failure (x402) results in no response"],"whenToPreferThis":"Use this endpoint when you need a multilingual, human-readable relative time string between two specific timestamps — especially when targeting non-English audiences (Turkish, German, French, Spanish) or when you need both the friendly phrase and the exact second-level difference in a single call. Prefer this over client-side libraries when the agent is composing messages or notifications server-side without access to a full date-formatting library.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:07.738Z","isFirstParty":false,"canonicalSlug":"fastx402-relative-time-formatter-e90ba6df"}