# ISO date month end

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

Return the last valid calendar day of the year-month of a YYYY-MM-DD date.

**Use when you need to: iso date month end · last day of month · end of calendar month.**

## Supported

- iso date month end
- last day of month
- end of calendar month

## Not supported

- last business day
- last weekday
- ISO week end
- time zones
- datetime with time
- fiscal month end

## Behavior

- date is a proleptic Gregorian UTC calendar date YYYY-MM-DD with years 0001-9999.
- Output is the last valid day of that year-month.
- February is 29 in proleptic Gregorian leap years and 28 otherwise.
- No business-day or weekday adjustment is applied.

## Input

- `date` (string, required): max length 10; pattern `^\d{4}-\d{2}-\d{2}$`

## Output

- `date` (string, required): max length 10; pattern `^\d{4}-\d{2}-\d{2}$`

## Limits

- min year: 1
- max year: 9999

## Example

Request input:

```json
{
  "date": "2024-02-10"
}
```

Response:

```json
{
  "result": {
    "date": "2024-02-29"
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "iso-date-month-end",
  "version": "1.0.0",
  "input": {
    "date": "2024-02-10"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/iso-date-month-end/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"date":"2024-02-10"}'
```

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

### CLI

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

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

## Related tools

- [ISO date month start](/tools/iso-date-month-start): Return the first calendar day of the year-month of a YYYY-MM-DD date.
- [ISO date last weekday of month](/tools/iso-date-last-weekday-of-month): Return the date of the last occurrence of an ISO weekday within a calendar month.
- [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 day of year](/tools/iso-date-day-of-year): Return the ordinal day number (1-366) of a YYYY-MM-DD date within its calendar year.
- [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.
- [ISO date from day of year](/tools/iso-date-from-day-of-year): Convert a calendar year and ordinal day number (1-366) to a YYYY-MM-DD date.
