# Date Difference Calculator

> Date Difference Calculator is a paid API for AI agents from timezone-time.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-24).

Calculates the exact difference between two dates as years, months, and days, plus total days, weeks, and whole months.

## Facts

- Endpoint: GET https://timezone-time.x402tookit.com/date-diff?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/date-difference-calculator-215a11a1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qHlLfBAPZnEKRKN_Hfckq

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 date-difference-calculator-215a11a1
```

Example prompt: How many years, months, and days are between 2015-03-14 and 2024-11-01, and what's that in total weeks and days?

## When to prefer this

Choose this endpoint when you need a precise, broken-down date difference — years, months, and days simultaneously — rather than just a raw day count. Ideal for displaying human-readable durations, calculating contract lengths, age differences between historical events, or any context where both component breakdown and total counts are needed together.

## Known failure modes

- Missing required query parameters 'start' or 'end' returns an error
- Malformed date strings not in YYYY-MM-DD format will cause a parsing error
- Invalid calendar dates (e.g. 2023-02-30) will be rejected
- Network or service unavailability may return a 5xx error

## How this service works

Exact difference between two dates as years, months and days, plus total days, weeks and whole months.

## Output

Returns the exact difference between two YYYY-MM-DD dates broken down into years, months, and days, plus total days, total weeks, total whole months, the direction (which date is earlier), and a human-readable summary. May include a disclaimer and degraded flag if something unusual occurred.

## 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": [
      "start",
      "end"
     ],
     "properties": {
      "end": {
       "type": "string",
       "description": "YYYY-MM-DD"
      },
      "start": {
       "type": "string",
       "description": "YYYY-MM-DD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "end": {
       "type": [
        "null",
        "string"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "days": {
       "type": [
        "null",
        "number"
       ]
      },
      "start": {
       "type": [
        "null",
        "string"
       ]
      },
      "years": {
       "type": [
        "null",
        "number"
       ]
      },
      "months": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "direction": {
       "type": [
        "null",
        "string"
       ]
      },
      "totalDays": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "totalWeeks": {
       "type": [
        "null",
        "number"
       ]
      },
      "totalMonthsWhole": {
       "type": [
        "null",
        "number"
       ]
      }

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/date-difference-calculator-215a11a1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from timezone-time.x402tookit.com](https://www.zero.xyz/host/timezone-time.x402tookit.com/llms.txt)
