# x402 Utils – Date Arithmetic & Difference Calculator

> x402 Utils – Date Arithmetic & Difference Calculator is a paid API for AI agents from qcb7fnxsbd7fbhj4.68r.lambda-web.us-east-1.on.aws, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Add or subtract an ISO 8601 duration to/from a date, or compute the difference between two dates in days, weeks, months, years, seconds, and business days (with country-specific public holidays).

## Facts

- Endpoint: GET https://qcb7fnxsbd7fbhj4.68r.lambda-web.us-east-1.on.aws/v1/date?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-utils-date-arithmetic-difference-calculator-cd16019c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8vUcKMNw9YlqUu1B-xmCO

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 x402-utils-date-arithmetic-difference-calculator-cd16019c
```

Example prompt: What date is exactly 3 months from 2026-10-25, and how many business days are between 2026-10-25 and that resulting date, excluding Japanese public holidays?

## When to prefer this

Choose this endpoint when you need precise calendar arithmetic — adding or subtracting ISO 8601 durations (with correct month-end clamping), computing multi-unit differences between two dates, or getting business-day counts that respect a specific country's public holidays. It is preferable over general-purpose code execution or LLM reasoning for date math because it handles edge cases like month-end clamping, ISO week numbers, and country-specific holiday calendars out of the box.

## Known failure modes

- Missing 'start' parameter returns a 400-level error
- Malformed ISO 8601 duration (e.g. 'P1month' instead of 'P1M') may return an error or unexpected result
- Invalid country code may result in no holiday adjustment or an error
- Providing neither 'end' nor 'add'/'subtract' returns only start-date metadata without difference or arithmetic
- Dates outside supported range may produce inaccurate results

## How this service works

Add or subtract an ISO 8601 duration (P1M, P2W, PT36H) to a date, months clamped to the month's end; or count the days, weeks, calendar months, years, seconds and business days (Monday to Friday, less a country's public holidays) between two dates. Also the weekday, ISO week and day of year.

## Output

A JSON object with a 'start' section containing the date, weekday, ISO week number, and day of year; and optionally a 'between' section with the difference expressed in days, weeks, months, years, seconds, and business days (adjusted for country-specific public holidays when a country code is supplied).

## 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"
     ],
     "properties": {
      "add": {
       "type": "string",
       "description": "an ISO 8601 duration to add, such as P1M10D"
      },
      "end": {
       "type": "string",
       "description": "a second date, to count the time between"
      },
      "start": {
       "type": "string",
       "description": "a date such as 2026-10-25, or an ISO 8601 time"
      },
      "country": {
       "type": "string",
       "description": "ISO country code whose public holidays are not business days, such as JP"
      },
      "subtract": {
       "type": "string",
       "description": "an ISO 8601 duration to subtract"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "start": {},
      "between": {}
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "start": {
   "date": "2026-10-25",
   "weekday": "Sunday",
   "iso_week": 43
  },
  "between": {
   "days": 61,
   "months": 2,
   "business_days": 42
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-utils-date-arithmetic-difference-calculator-cd16019c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qcb7fnxsbd7fbhj4.68r.lambda-web.us-east-1.on.aws](https://www.zero.xyz/host/qcb7fnxsbd7fbhj4.68r.lambda-web.us-east-1.on.aws/llms.txt)
