---
title: "Exact date arithmetic — the calendar math LLMs guess at"
method: GET
path: "/api/calc/dates"
tags: ["Math"]
---

# Exact date arithmetic — the calendar math LLMs guess at

`GET /api/calc/dates`

## Request

- Base URL: `https://api.webbersites.com`
- URL: `https://api.webbersites.com/api/calc/dates`
- Auth: API key in header `X-PAYMENT`

Exact date arithmetic — the calendar math LLMs guess at. ?from=&to= → days, business days, weeks, hours between; ?date=&add=30d|2w|3m|1y|10bd → the resulting date (bd = business days); ?date= alone → weekday, ISO week, day-of-year, leap year, unix. All UTC, Mon-Fri business days, real-calendar validation (Feb 30 is rejected).

Price: $0.001 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

## Query parameters

- `from` string
- `to` string
- `date` string
- `add` string

## Response `200`

Success

- object
  - `from` object
  - `to` object
  - `diff` object
  - `result` object
  - `date` object

## Other responses

- `402`: Payment required — the response body lists accepted payment methods (amount, asset, network, pay-to address). Retry the request with a signed X-PAYMENT header.

---

[API](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api.md) · [All operations](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/revisions/c14a76c67a94?raw)
