Clock Window Day Splitter
Split each ordinary or overnight half-open civil clock window into same-day segments; no time-zone inference.
Description
Split each ordinary or overnight half-open civil clock window into same-day segments; no time-zone inference.
An overnight clock window can be represented by two same-day half-open segments.
When to use this tool
Split each ordinary or overnight half-open civil clock window into same-day segments; no time-zone inference.
- Prepare the supplied windowsJson fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter windowsJson. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.segments. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Validate each windowsJson endpoint as an integer from 0 to 86,399. Keep start<=end as one pair, otherwise split at 86,400 and zero, preserving input order.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| windowsJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.
[
{
"field": "windowsJson",
"decoded": [
[
80000,
100
],
[
50,
200
]
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.segments | The segments list in the ordering and representation described above. |
{
"input": {
"windowsJson": "[[80000,100],[50,200]]"
},
"output": {
"result": {
"segments": [
[
80000,
86400
],
[
0,
100
],
[
50,
200
]
]
}
}
} Limitations and assumptions
- Segments are not merged or deduplicated. Equal endpoints remain a zero-length pair rather than a full-day interval.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Keep elapsed durations, circular clocks, calendar months and epoch offsets distinct. Use a date/time method with explicit timezone and timescale rules for dated instants; arithmetic on one representation does not supply the others.
References
Similar or alternative tools
- Clock Components to Seconds Of Day
Join validated ordinary civil clock components into seconds of day; leap-second 60 is not accepted.
- Clock Offset with Day Carry
Offset civil seconds of day and retain signed day carry; no time-zone transitions or date interpretation.