# FastX402 Relative Time Formatter

> FastX402 Relative Time Formatter is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-17).

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.

## Facts

- Endpoint: GET https://fastx402.tools/relative-time?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-relative-time-formatter-e90ba6df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QruHae4MDseNiD6E7UOq-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fastx402-relative-time-formatter-e90ba6df
```

Example prompt: 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'.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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).

## Request schema (JSON Schema)

```json
{
 "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"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "about 4 hours ago",
  "strict": "4 hours ago",
  "seconds": -12600
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-relative-time-formatter-e90ba6df/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
