# ISO date add years

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

Add a signed whole-year delta to a YYYY-MM-DD date, clamping the day if 29 February has no match.

**Use when you need to: iso date add years · add calendar years to a date · shift date by years.**

## Supported

- iso date add years
- add calendar years to a date
- shift date by years

## Not supported

- add days
- add months
- add seconds
- time zones
- fiscal years
- datetime with time

## Behavior

- date is a proleptic Gregorian UTC calendar date YYYY-MM-DD with years 0001-9999.
- years is a canonical integer string with at most 5 digits excluding sign; -0 is accepted as 0.
- The month and day-of-month are kept unchanged except that 29 February is clamped to 28 February when the target year is not a leap year.
- The result year must stay in 0001-9999, or the call is rejected.
- Output date is zero-padded YYYY-MM-DD.

## Input

- `date` (string, required): min length 10; max length 10; pattern `^\d{4}-\d{2}-\d{2}$`
- `years` (string, required): max length 6; pattern `^-?(0|[1-9][0-9]*)$`

## Output

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

## Limits

- year min: 1
- year max: 9999
- max years digits: 5

## Example

Request input:

```json
{
  "date": "2026-09-15",
  "years": "1"
}
```

Response:

```json
{
  "result": {
    "date": "2027-09-15"
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "iso-date-add-years",
  "version": "1.0.0",
  "input": {
    "date": "2026-09-15",
    "years": "1"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/iso-date-add-years/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"date":"2026-09-15","years":"1"}'
```

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

### CLI

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

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

## Related tools

- [ISO date add months](/tools/iso-date-add-months): Add a signed month count to a YYYY-MM-DD date, clamping the day to the target month.
- [ISO date-time add seconds](/tools/iso-datetime-add-seconds): Add a signed whole-second delta to a strict UTC ISO-8601 datetime.
- [ISO date add](/tools/iso-date-add): Add a signed whole-day delta to a strict YYYY-MM-DD calendar date.
- [ISO date age](/tools/iso-date-age): Compute the calendar-aware elapsed years, months, and days between a birth date and an as-of 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 days in month](/tools/iso-date-days-in-month): Return the number of calendar days in a given proleptic Gregorian year and month.
