# ISO date min max

`iso-date-min-max` · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed

Return the earliest and latest date in a non-empty array of YYYY-MM-DD calendar dates.

**Use when you need to: iso date min max · earliest and latest date · date array bounds.**

## Supported

- iso date min max
- earliest and latest date
- date array bounds

## Not supported

- index of min
- datetime input
- timezones

## Behavior

- dates is a non-empty array of strict YYYY-MM-DD proleptic Gregorian UTC calendar dates with year 0001-9999, at most 10000 items.
- min and max are the earliest and latest input dates by civil day serial.
- Ties keep the value unchanged; duplicates do not affect the result.

## Input

- `dates` (array of string, required): min items 1; max items 10000; each min length 10; each max length 10; each pattern `^\d{4}-\d{2}-\d{2}$`

## Output

- `min` (string, required): min length 10; max length 10
- `max` (string, required): min length 10; max length 10

## Limits

- max items: 10000
- year min: 1
- year max: 9999

## Example

Request input:

```json
{
  "dates": [
    "2026-03-01",
    "2026-01-01",
    "2026-02-01"
  ]
}
```

Response:

```json
{
  "result": {
    "min": "2026-01-01",
    "max": "2026-03-01"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "iso-date-min-max",
  "version": "1.0.0",
  "input": {
    "dates": [
      "2026-03-01",
      "2026-01-01",
      "2026-02-01"
    ]
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/iso-date-min-max/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"dates":["2026-03-01","2026-01-01","2026-02-01"]}'
```

The machine-readable contract is at [/v1/tools/iso-date-min-max/versions/1.0.0](/v1/tools/iso-date-min-max/versions/1.0.0).

### CLI

```sh
node cli.mjs run iso-date-min-max 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [ISO date clamp](/tools/iso-date-clamp): Clamp a YYYY-MM-DD calendar date into an inclusive [min, max] range.
- [ISO date quarter bounds](/tools/iso-date-quarter-bounds): Return the calendar quarter number and the first/last dates of the quarter containing a date.
- [ISO date week bounds](/tools/iso-date-week-bounds): Return the Monday and Sunday of the ISO-8601 week that contains a calendar date.
- [ISO date business day add](/tools/iso-date-business-day-add): Add a signed count of business days to a date, skipping caller-supplied weekend weekdays and holidays.
- [ISO date to week](/tools/iso-date-to-week): Convert a YYYY-MM-DD calendar date to an ISO-8601 week date.
- [ISO date-time clamp](/tools/iso-datetime-clamp): Clamp a strict UTC ISO-8601 datetime into an inclusive [min, max] range.
