ISO date range intersect
iso-date-range-intersect · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed
Compute the intersection of two inclusive [start, end] date ranges.
Use when you need to: iso date range intersect · overlap of two date ranges · common days between date ranges.
Supported
- iso date range intersect
- overlap of two date ranges
- common days between date ranges
Not supported
- open ranges
- timezones
- datetime ranges
- multi-range intersection
Behavior
- a and b are each an inclusive [start, end] YYYY-MM-DD date range with year 0001-9999; start must not be after end in either.
- intersection is {start, end} covering the days common to both ranges (max(a.start,b.start) to min(a.end,b.end)) when they overlap, or null when they do not.
Input
a(object, required)b(object, required)
Output
intersection(null or object, required)
Limits
- year min: 1
- year max: 9999
Example
Request input:
{
"a": {
"start": "2026-01-01",
"end": "2026-01-10"
},
"b": {
"start": "2026-01-05",
"end": "2026-01-20"
}
}
Response:
{
"result": {
"intersection": {
"start": "2026-01-05",
"end": "2026-01-10"
}
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "iso-date-range-intersect",
"version": "1.0.0",
"input": {
"a": {
"start": "2026-01-01",
"end": "2026-01-10"
},
"b": {
"start": "2026-01-05",
"end": "2026-01-20"
}
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/iso-date-range-intersect/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"a":{"start":"2026-01-01","end":"2026-01-10"},"b":{"start":"2026-01-05","end":"2026-01-20"}}'
The machine-readable contract is at /v1/tools/iso-date-range-intersect/versions/1.0.0.
CLI
node cli.mjs run iso-date-range-intersect 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- ISO date range overlap: Test whether two inclusive [start, end] date ranges share at least one day.
- ISO date business days count: Count the business days in an inclusive date range, skipping caller-supplied weekend weekdays and holidays.
- ISO date range list: Enumerate the dates in an inclusive [start, end] range stepped by a whole number of days.
- ISO date weekday occurrences in range: List every date within an inclusive date range that falls on a given ISO weekday.
- ISO date age: Compute the calendar-aware elapsed years, months, and days between a birth date and an as-of date.
- ISO date difference: Whole days from start to end as a canonical integer string (end - start).