# FastX402 Date Difference Calculator

> FastX402 Date Difference Calculator is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-18).

Calculates the number of days, weeks, business days, and calendar breakdown (years, months, days) between two dates

## Facts

- Endpoint: GET https://fastx402.tools/date-diff?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-date-difference-calculator-982229e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bT5i_MKhdAKLVqg3snIUy

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-date-difference-calculator-982229e4
```

Example prompt: How many days and business days are there between March 1, 2025 and December 31, 2025?

## When to prefer this

Use this endpoint when an agent needs to calculate the exact number of days, weeks, business days, or calendar-unit breakdown between two specific dates without requiring account setup or API keys. It is ideal for lightweight, pay-per-call date math in automated workflows where spinning up a full calendar library is overkill. Prefer this over manual computation when business day accuracy (excluding weekends) is required.

## Known failure modes

- Missing required 'start' or 'end' query parameter returns an error
- End date before start date returns an error or undefined behavior
- Malformed date strings (not YYYY-MM-DD) cause parsing failures
- Invalid calendar dates (e.g. 2023-02-30) return an error
- Payment failure via x402 results in HTTP 402 response before computation

## How this service works

200 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 total days, total weeks, business days, and a calendar breakdown of years, months, and days between the two input dates. Example: {start:'2024-02-29', end:'2026-03-01', days:731, weeks:104, business_days:522, calendar:{years:2, months:0, days:1}}

## 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": "Second date, YYYY-MM-DD (not before start)"
      },
      "start": {
       "type": "string",
       "description": "First date, YYYY-MM-DD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "end": {
       "type": "string"
      },
      "days": {
       "type": "integer"
      },
      "start": {
       "type": "string"
      },
      "weeks": {
       "type": "integer"
      },
      "calendar": {
       "type": "object",
       "properties": {
        "days": {
         "type": "integer"
        },
        "years": {
         "type": "integer"
        },
        "months": {
         "type": "integer"
        }
       }
      },
      "business_days": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "end": "2026-03-01",
  "days": 731,
  "start": "2024-02-29",
  "weeks": 104,
  "calendar": {
   "days": 1,
   "years": 2,
   "months": 0
  },
  "business_days": 522
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-date-difference-calculator-982229e4/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)
