# Foundry Date Difference Calculator

> Foundry Date Difference Calculator is a paid API for AI agents from minty-sprout.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-01).

Computes the difference between two dates in days, weeks, months, and years, including weekday names for each date.

## Facts

- Endpoint: POST https://minty-sprout.onrender.com/v1/date-difference?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-date-difference-calculator-5d22d5e3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WJ3UCIcKYqUQ2YGWwRm0n

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 foundry-date-difference-calculator-5d22d5e3 -d '<json body>'
```

Example prompt: How many days, weeks, and months are there between January 1 2026 and December 25 2026?

## When to prefer this

Choose this endpoint when you need a structured breakdown of the time span between two specific dates across multiple units (days, weeks, months, years) simultaneously, especially when you also want weekday names for both dates. It is ideal for deadline tracking, event planning, and age calculation without needing to write custom date arithmetic logic.

## Known failure modes

- Invalid or malformed date format (non-YYYY-MM-DD input) may return an error or unexpected result
- Missing or empty input string may cause a processing error
- Providing only one date relies on 'today' as the reference, which may be ambiguous in automated contexts
- Very large date ranges may produce imprecise decimal values for weeks/years

## How this service works

Date difference: days, weeks, months and years between two dates. Input: '2026-01-01 2026-12-25'.

## Output

A JSON object containing the two input dates (from/to), the difference expressed as days (integer), weeks (decimal), months (integer), and years (decimal), plus the weekday names for both the start and end dates.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 8000,
   "description": "Two YYYY-MM-DD dates (or one: from today)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "2026-12-25",
  "days": 358,
  "from": "2026-01-01",
  "weeks": 51.14,
  "years": 0.98,
  "months": 11,
  "weekday_to": "Friday",
  "weekday_from": "Thursday"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-date-difference-calculator-5d22d5e3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from minty-sprout.onrender.com](https://www.zero.xyz/host/minty-sprout.onrender.com/llms.txt)
