ISO date add months
iso-date-add-months · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed
Add a signed month count to a YYYY-MM-DD date, clamping the day to the target month.
Use when you need to: iso date add months · add calendar months to an iso date · shift iso date by months.
Supported
- iso date add months
- add calendar months to an iso date
- shift iso date by months
Not supported
- add days
- add seconds
- add years as a separate unit
- time zones
- locale month names
- fiscal calendars
- datetime with time
- ISO week arithmetic
Behavior
- date is a proleptic Gregorian UTC calendar date YYYY-MM-DD with years 0001-9999.
- months is a canonical integer string with at most 6 digits excluding sign; -0 is accepted as 0.
- Month arithmetic uses index = year*12 + (month-1) + months, then year-prime = floor(index/12) and month-prime in 1..12.
- The day is clamped to the last valid day of the target month (31 January plus one month is 28 or 29 February).
- The result year must stay in 0001-9999.
- Output date is zero-padded YYYY-MM-DD.
Input
date(string, required): max length 10; pattern^\d{4}-\d{2}-\d{2}$months(string, required): max length 7; pattern^-?(0|[1-9][0-9]*)$
Output
date(string, required): max length 10; pattern^\d{4}-\d{2}-\d{2}$
Limits
- min year: 1
- max year: 9999
- max months digits: 6
Example
Request input:
{
"date": "2026-01-31",
"months": "1"
}
Response:
{
"result": {
"date": "2026-02-28"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "iso-date-add-months",
"version": "1.0.0",
"input": {
"date": "2026-01-31",
"months": "1"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/iso-date-add-months/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"date":"2026-01-31","months":"1"}'
The machine-readable contract is at /v1/tools/iso-date-add-months/versions/1.0.0.
CLI
node cli.mjs run iso-date-add-months 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- ISO date add years: Add a signed whole-year delta to a YYYY-MM-DD date, clamping the day if 29 February has no match.
- ISO date-time add seconds: Add a signed whole-second delta to a strict UTC ISO-8601 datetime.
- ISO date add: Add a signed whole-day delta to a strict YYYY-MM-DD calendar date.
- 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: Add a signed count of business days to a date, skipping caller-supplied weekend weekdays and holidays.
- ISO date range split by month: Split an inclusive [start, end] date range into per-calendar-month sub-ranges.