Local interval resolve
local-interval-resolve · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed
Resolve a zoned local start/end pair to exact millisecond instants under explicit gap and overlap policies.
Use when you need to: resolve local interval to instants · apply DST gap policy to interval · apply overlap policy to local endpoints.
Decide before calling
Read the versioned contract and the supported scope below. Reuse local-interval-resolve@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use local-interval-resolve@1.0.0 for resolve local interval to instants. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- resolve local interval to instants
- apply DST gap policy to interval
- apply overlap policy to local endpoints
- convert New York local interval to epoch milliseconds
- resolve ambiguous local start and end
- resolve US Eastern interval
Not supported
- discover host time zone
- resolve zones outside the pinned subset
- apply current civil law
Behavior
- RFC 9557 local times are resolved using explicit ambiguity and gap policies against the pinned IANA snapshot.
- The returned interval preserves endpoint ordering; each endpoint records the selected UTC offset and resolution.
- Alias US/Eastern is reported canonically as America/New_York.
- America/New_York and US/Eastern are supported only for local years 1970 through 2037.
- Caller rules are versioned by the required caller_rule_version.
Input
start_local(string, required): pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?$end_local(string, required): pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?$zone(string, required): min length 1; max length 64ambiguity_policy(one of "earlier", "later", "reject", required)gap_policy(one of "shift_forward", "shift_backward", "reject", required)caller_rule_version(string, required): min length 1; max length 64
Output
standard_version(string, required)data_version(string, required)caller_rule_version(string, required)canonical_zone(string, required)start(object, required)end(object, required)
Limits
- max input bytes: 4096
- max local chars: 23
Example
Request input:
{
"start_local": "2025-01-15T10:00:00",
"end_local": "2025-01-15T11:00:00",
"zone": "UTC",
"ambiguity_policy": "earlier",
"gap_policy": "reject",
"caller_rule_version": "rules-1"
}
Response:
{
"result": {
"standard_version": "RFC9557/RFC3339/ISO8601-1:2019",
"data_version": "iana-tzdb-2025b-subset-nyc",
"caller_rule_version": "rules-1",
"canonical_zone": "UTC",
"start": {
"instant_ms": "1736935200000",
"offset_seconds": 0,
"resolution": "exact"
},
"end": {
"instant_ms": "1736938800000",
"offset_seconds": 0,
"resolution": "exact"
}
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "local-interval-resolve",
"version": "1.0.0",
"input": {
"start_local": "2025-01-15T10:00:00",
"end_local": "2025-01-15T11:00:00",
"zone": "UTC",
"ambiguity_policy": "earlier",
"gap_policy": "reject",
"caller_rule_version": "rules-1"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/local-interval-resolve/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"start_local":"2025-01-15T10:00:00","end_local":"2025-01-15T11:00:00","zone":"UTC","ambiguity_policy":"earlier","gap_policy":"reject","caller_rule_version":"rules-1"}'
The machine-readable contract is at /v1/tools/local-interval-resolve/versions/1.0.0.
CLI
node cli.mjs run local-interval-resolve 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Local interval normalize: Normalize millisecond interval endpoint conventions into a canonical half-open interval.
- Working hours expand: Expand versioned weekly work schedules, overrides, closures, and DST policies into exact UTC intervals.
- Appointment windows build: Build deterministic appointment windows from pinned time-zone facts and caller-supplied booking rules.
- ISO date quarter bounds: Return the calendar quarter number and the first/last dates of the quarter containing a date.
- ISO date to week: Convert a YYYY-MM-DD calendar date to an ISO-8601 week date.
- ISO date week bounds: Return the Monday and Sunday of the ISO-8601 week that contains a calendar date.