Description
Return overlap and union duration of two caption intervals.
Accessibility-related records can describe visible time, available formats, label text or supplied requirements. A count or budget can expose local gaps without establishing usable content, valid accommodations or compliance with a standard.
Return overlap and union duration of two caption intervals.
When to use this tool
Use Caption Overlap Duration when checking an explicit accessibility record, time or layout convention.
How to use the tool and how it works
- Enter firstStart, firstEnd, secondStart, secondEnd. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read overlap, totalCovered. Use the output convention below.
Return overlap and union duration of two caption intervals. Require each start <= end; overlap = max(0,min(ends)-max(starts)), and totalCovered is the two durations minus overlap.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstStart | First Start | Required. Finite number. |
| firstEnd | First End | Required. Finite number. |
| secondStart | Second Start | Required. Finite number. |
| secondEnd | Second End | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| overlap | Overlap | Required. Finite number. |
| totalCovered | Total Covered | Required. Finite number. |
{
"input": {
"firstStart": 0,
"firstEnd": 10,
"secondStart": 8,
"secondEnd": 15
},
"output": {
"overlap": 2,
"totalCovered": 15
}
} Limitations and assumptions
- Touching intervals add no overlap duration; this does not assess caption text or readability.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the applicable accessibility guidance, real content and user evaluation for practical adequacy; establish any legal requirement separately.
References
Similar or alternative tools
- Caption Visible Duration Gap
Compare caption visibility duration with a supplied requirement.
- Access Request Response Delay
Return elapsed and pause-adjusted access-request response time.