# SiteCheck Date Calculator

> SiteCheck Date Calculator is a paid API for AI agents from api.sitecheck-api.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-16).

Performs date arithmetic and timezone conversions: calculates differences between dates, adds or subtracts time units, retrieves date info including age, and converts times between IANA timezones.

## Facts

- Endpoint: GET https://api.sitecheck-api.workers.dev/api/date/calc?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-date-calculator-d689d1c0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2DxEhb_Gji2fToYk4ZhCc

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 sitecheck-date-calculator-d689d1c0
```

Example prompt: How many days, weeks, and months are there between February 29, 2000 and October 15, 2026? Use the date diff operation.

## When to prefer this

Choose this endpoint when an agent needs precise calendar arithmetic — especially date differences with multi-unit breakdowns (days, weeks, months, years), date offsets, age calculations from a birthdate, or timezone conversions — without relying on the LLM's own date math, which can be error-prone. Ideal for workflows requiring deterministic, auditable date computations at very low cost ($0.001 per call).

## Known failure modes

- Missing required 'op' query parameter returns an error
- Invalid date format (not YYYY-MM-DD) causes a parse error
- Unrecognized IANA timezone string causes a timezone conversion failure
- Missing required companion parameters for the operation (e.g., 'from'/'to' for diff) returns an error
- Non-integer 'amount' for add/subtract operations may fail validation

## How this service works

Date and time calculations in pure code. op=diff: calendar years, months and days between two dates, and the total days. op=add or subtract: move a date by years, months, weeks, days, hours or minutes (month ends are clamped). op=info: weekday, ISO week, day of year, quarter, and age from birthDate. op=tz: a local date-time in one IANA time zone shown in another. Impossible dates are a 400 with the reason.

## Output

Returns a JSON object with the computed result for the requested operation: for 'diff', includes days, years, months, direction, totalDays, totalHours, totalWeeks, from, to, and checkedAt timestamp; for 'add'/'subtract', returns the resulting date; for 'info', returns age details; for 'tz', returns the converted datetime in the target timezone. All results are computed server-side using proleptic Gregorian calendar arithmetic.

## 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": [
      "op"
     ],
     "properties": {
      "op": {
       "type": "string",
       "description": "diff, add, subtract, info or tz"
      },
      "to": {
       "type": "string",
       "description": "diff: end date YYYY-MM-DD"
      },
      "asOf": {
       "type": "string",
       "description": "info: the date the age is counted to, default today (UTC)"
      },
      "date": {
       "type": "string",
       "description": "add, subtract, info: date YYYY-MM-DD"
      },
      "from": {
       "type": "string",
       "description": "diff: start date YYYY-MM-DD; tz: local date-time YYYY-MM-DDTHH:MM"
      },
      "unit": {
       "type": "string",
       "description": "add, subtract: years, months, weeks, days (default), hours or minutes"
      },
      "amount": {
       "type": "string",
       "description": "add, subtract: whole number"
      },
      "to_zone": {
       "type": "string",
       "description": "tz: IANA zone to show, e.g. America/New_York"
      },
      "datetime": {
       "type": "string",
       "description": "tz: local date-time like 2026-10-15T09:30"
      },
      "birthDate": {
       "type": "string",
       "description": "info: date of birth YYYY-MM-DD, for the age"
      },
      "from_zone": {
       "type": "string",
       "description": "tz: IANA zone of the given time, e.g. Europe/Berlin"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "diff",
  "to": "2026-10-15",
  "days": 16,
  "from": "2000-02-29",
  "years": 26,
  "months": 7,
  "source": "Computed here (pure code, proleptic Gregorian calendar)",
  "checkedAt": "2026-10-15T14:00:29.548Z",
  "direction": "forward",
  "totalDays": 9725,
  "totalHours": 233400,
  "totalWeeks": 1389
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-date-calculator-d689d1c0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.sitecheck-api.workers.dev](https://www.zero.xyz/host/api.sitecheck-api.workers.dev/llms.txt)
