Skip to content

Main content

Caption Overlap Duration Tool

Intersect supplied half-open caption windows without judging caption accessibility or quality.

Loading tool…

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

  1. Enter firstStart, firstEnd, secondStart, secondEnd. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
firstStartFirst StartRequired. Finite number.
firstEndFirst EndRequired. Finite number.
secondStartSecond StartRequired. Finite number.
secondEndSecond EndRequired. Finite number.
Output fieldInterpretationReturned shape
overlapOverlapRequired. Finite number.
totalCoveredTotal CoveredRequired. Finite number.
json
{
  "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

  1. Calculation and input contract: disability-studies/caption-overlap-duration — tool.io

Similar or alternative tools