# Business Days Calculator

> Business Days Calculator is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Calculates a future or past date by adding or subtracting a specified number of business days from a start date, with support for custom holidays and timezones.

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/business-days
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/business-days-calculator-31d4ab82
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_03V4H4WtVEO8OKFOyi9N7

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 business-days-calculator-31d4ab82 -d '<json body>'
```

Example prompt: What date is 5 business days from today (2025-01-15), excluding New Year's Day and MLK Day, in the America/New_York timezone?

## When to prefer this

Use this endpoint when you need programmatic, pay-per-call business day arithmetic without setting up a dedicated calendar library or service — especially useful for trading settlement dates (T+2, T+3), contract deadlines, or financial workflows that require excluding weekends and custom holidays across timezones. Prefer this over generic date libraries when running in an agent context without local compute or when you need a reliable, stateless, hosted computation.

## Known failure modes

- Missing required addDays field returns a 400 validation error
- Invalid ISO date format for start date causes a parsing error
- Unrecognized IANA timezone string results in a timezone resolution error
- Non-integer or extremely large addDays value may cause unexpected results
- Malformed holiday array entries (non YYYY-MM-DD format) may be ignored or cause errors

## How this service works

Add/subtract business days (skips weekends + given holidays). Send { start?, addDays, holidays?, timezone? }.

## Output

Returns the computed calendar date after adding or subtracting the specified number of business days from the start date, accounting for weekends and any custom holidays provided, expressed as an ISO date string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "addDays"
 ],
 "properties": {
  "start": {
   "type": "string",
   "description": "ISO start date, default now"
  },
  "addDays": {
   "type": "number",
   "description": "Business days to add (can be negative)"
  },
  "holidays": {
   "type": "object",
   "description": "Array of YYYY-MM-DD holiday strings"
  },
  "timezone": {
   "type": "string",
   "description": "IANA tz"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/business-days-calculator-31d4ab82/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
