# AGISHub Date Calculate

> AGISHub Date Calculate is a paid API for AI agents from api.agishub.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Performs timezone-aware date arithmetic: add or subtract a duration from a datetime, or compute the difference between two datetimes across different timezones with DST-safe calendar math.

## Facts

- Endpoint: POST https://api.agishub.com/paid/date-calculate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-date-calculate-86a34181
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2VbRwIfTc5ZHZEsoeDbAf

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 agishub-date-calculate-86a34181 -d '<json body>'
```

Example prompt: What date and time will it be 45 days from now starting from March 1, 2025 at 9am America/New_York time? Use calendar-day math so DST changes are handled correctly.

## When to prefer this

Choose this endpoint when you need reliable, DST-aware calendar date arithmetic or cross-timezone datetime differencing. It handles the edge cases of daylight saving transitions correctly (days are calendar-based, not always 24-hour periods) and accepts natural language datetimes alongside ISO 8601 strings. Prefer it over client-side date math when DST correctness, cross-timezone accuracy, or auditability matter.

## Known failure modes

- Invalid or unrecognizable datetime string — returns error if natural language cannot be parsed
- Unknown IANA timezone identifier — returns error with message about unrecognized timezone
- Missing required operation parameters (e.g. 'add' without amount/unit, 'diff' without to_datetime) — returns validation error
- Out-of-range or malformed amount values — may return error or unexpected result
- Payment failure or insufficient balance — HTTP 402 response requiring x402 payment

## How this service works

Timezone-aware date arithmetic: add or subtract a duration to a datetime (days are calendar-based and DST-safe; hours and minutes are absolute), or compute the difference between two datetimes that may be in different zones.

## Output

A JSON object containing the computed result: for 'add' operations, the resulting datetime (ISO 8601) in the original timezone accounting for DST transitions; for 'diff' operations, the numeric difference between the two datetimes expressed in a meaningful unit (e.g. total seconds, minutes, hours, or days).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "datetime",
      "timezone",
      "operation"
     ],
     "properties": {
      "datetime": {
       "type": "string",
       "description": "Base datetime: ISO 8601 or natural language."
      },
      "timezone": {
       "type": "string",
       "description": "IANA timezone the base datetime is in."
      },
      "operation": {
       "type": "object",
       "required": [
        "type"
       ],
       "properties": {
        "type": {
         "enum": [
          "add",
          "diff"
         ],
         "type": "string",
         "description": "'add' to shift the datetime by a duration, or 'diff' to measure the gap between two datetimes."
        },
        "unit": {
         "enum": [
          "seconds",
          "minutes",
          "hours",
          "days",
          "weeks"
         ],
         "type": "string",
         "description": "For type 'add': one of seconds, minutes, hours, days, weeks."
        },
        "amount": {
         "type": "number",
         "description": "For type 'add': how much to shift. Use a negative number to subtract."
        },
        "to_datetime": {
         "type": "string",
         "description": "For type 'diff': the second datetime (ISO 8601 or natural language)."
        },
        "to_timezone": {
         "type": "string",
         "description": "For type 'diff': the IANA timezone of to_datetime (defaults to the base timezone)."
        }
       },
       "description": "What to compute: { type:'add', amount, unit } to add/subtract a duration, or { type:'diff', to_datetime, to_timezone? } for the difference between two datetimes.",
       "additionalProperties": false
      }
     },
     "additionalProperties": false
    },
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type"
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-date-calculate-86a34181/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agishub.com](https://www.zero.xyz/host/api.agishub.com/llms.txt)
