# 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-15).

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-day handling.

## Facts

- Endpoint: GET https://api.agishub.com/v1/date-calculate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-date-calculate-25103159
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bOBNnVtl0CEnf-YYPd398

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-25103159
```

Example prompt: What date and time will it be exactly 90 calendar days after March 15, 2025 at 9:00am in America/New_York? I need the result accounting for daylight saving time.

## When to prefer this

Choose this endpoint when you need precise, DST-aware calendar arithmetic — especially when crossing daylight saving boundaries or computing differences between datetimes in different IANA timezones. It distinguishes between calendar-based days (which respect DST) and absolute hours/minutes, making it more reliable than naive date math. Prefer it over general-purpose LLMs for date arithmetic to avoid hallucination errors in timezone-sensitive calculations.

## Known failure modes

- Invalid or unrecognized IANA timezone identifier returns an error
- Malformed or ambiguous datetime string that cannot be parsed fails with a parsing error
- Missing required 'operation' fields (e.g. amount/unit for 'add', to_datetime for 'diff') return a validation error
- Providing an out-of-range amount (extremely large durations) may produce unexpected results
- Network or service unavailability returns a non-200 HTTP error

## 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 string in the specified timezone; for 'diff' operations, the numeric difference between the two datetimes in the relevant unit, both adjusted for DST and cross-timezone offsets.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "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
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalPro
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "Timezone-aware date arithmetic: add or subtract a duration to a datetime (days are calendar-based and DST-safe; hours an"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-date-calculate-25103159/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)
