Working hours contains
working-hours-contains · version 1.0.0 · Dates & times (UTC, ISO 8601) · free, no key needed
Test whether an exact UTC instant is inside a versioned expanded working-hours calendar.
Use when you need to: check instant in working hours · is timestamp during office hours · test UTC instant against shifts.
Decide before calling
Read the versioned contract and the supported scope below. Reuse working-hours-contains@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 working-hours-contains@1.0.0 for check instant in working hours. 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
- check instant in working hours
- is timestamp during office hours
- test UTC instant against shifts
- working calendar membership
- check split shift membership
- apply closures to instant
- DST-aware work time check
Not supported
- find the next opening time
- parse human date text
- infer holidays
Behavior
- Membership uses half-open intervals: the start is included and the end is excluded.
- Expansion follows RFC 9557 and ISO 8601-1:2019 under explicit DST policies.
- Pinned IANA tzdb 2025b subset only; caller_rule_version is echoed without asserting legal currency.
Input
calendar(object, required)range_start_date(string, required): pattern^\d{4}-\d{2}-\d{2}$range_end_date(string, required): pattern^\d{4}-\d{2}-\d{2}$instant_epoch_second(integer, required)
Output
standard_version(string, required)data_version(string, required)caller_rule_version(string, required)canonical_time_zone(string, required)contains(boolean, required)
Limits
- max input bytes: 200000
- max days: 366
- max intervals per day: 16
- max overrides: 366
- max closures: 366
- max output intervals: 12000
Example
Request input:
{
"calendar": {
"time_zone": "UTC",
"caller_rule_version": "example-v1",
"weekly": {
"mon": [
{
"start": "09:00",
"end": "17:00"
}
]
},
"overrides": [],
"closures": [],
"gap_policy": "reject",
"overlap_policy": "earlier"
},
"range_start_date": "2025-01-06",
"range_end_date": "2025-01-07",
"instant_epoch_second": 1736154000
}
Response:
{
"result": {
"standard_version": "RFC 9557; ISO 8601-1:2019",
"data_version": "iana-tzdb-2025b",
"caller_rule_version": "example-v1",
"canonical_time_zone": "UTC",
"contains": true
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "working-hours-contains",
"version": "1.0.0",
"input": {
"calendar": {
"time_zone": "UTC",
"caller_rule_version": "example-v1",
"weekly": {
"mon": [
{
"start": "09:00",
"end": "17:00"
}
]
},
"overrides": [],
"closures": [],
"gap_policy": "reject",
"overlap_policy": "earlier"
},
"range_start_date": "2025-01-06",
"range_end_date": "2025-01-07",
"instant_epoch_second": 1736154000
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/working-hours-contains/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"calendar":{"time_zone":"UTC","caller_rule_version":"example-v1","weekly":{"mon":[{"start":"09:00","end":"17:00"}]},"overrides":[],"closures":[],"gap_policy":"reject","overlap_policy":"earlier"},"range_start_date":"2025-01-06","range_end_date":"2025-01-07","instant_epoch_second":1736154000}'
The machine-readable contract is at /v1/tools/working-hours-contains/versions/1.0.0.
CLI
node cli.mjs run working-hours-contains 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Working hours expand: Expand versioned weekly work schedules, overrides, closures, and DST policies into exact UTC intervals.
- Working hours total: Total exact elapsed seconds in a versioned working-hours calendar after DST and closure expansion.
- Appointment request check: Check an appointment request against pinned time-zone facts and caller-supplied booking rules.
- Duration application check: Check a claimed timestamp from adding or subtracting an ISO 8601 duration under explicit offset and month-end rules.
- ISO date range contains: Test whether an inclusive [start, end] date range contains a given date.
- ISO date add months: Add a signed month count to a YYYY-MM-DD date, clamping the day to the target month.