Skip to content

Main content

Contact Risk Window Overlap Duration Term Tool

Duration overlap of half-open contact and caller-supplied risk intervals, without assigning infection risk.

Loading tool…

Description

Return overlap = max(0,min(contactEnd,riskEnd)-max(contactStart,riskStart)); overlaps is true only when the untruncated difference is strictly positive.

Epidemiological timing depends on which event defines the origin, how intervals include their boundaries and whether time is observed. Numeric day coordinates and elapsed intervals do not by themselves select a calendar or a transmission model.

Return overlap = max(0,min(contactEnd,riskEnd)-max(contactStart,riskStart)); overlaps is true only when the untruncated difference is strictly positive.

When to use this tool

Use Contact Risk Window Overlap Duration Term when reconciling supplied day coordinates, observation windows or interval boundaries.

How to use the tool and how it works

  1. Enter contactStart, contactEnd, riskStart, riskEnd. 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, overlaps. Inspect overlaps before interpreting the associated values.

Require contactEnd >= contactStart and riskEnd >= riskStart. Return overlap = max(0,min(contactEnd,riskEnd)-max(contactStart,riskStart)); overlaps is true only when the untruncated difference is strictly positive. All coordinates must use a common time unit and origin.1

Input fieldMeaning and unitsAccepted input
contactStartContact StartRequired. Finite number.
contactEndContact EndRequired. Finite number.
riskStartRisk StartRequired. Finite number.
riskEndRisk EndRequired. Finite number.
Output fieldInterpretationReturned shape
overlapOverlapRequired. Finite number.
overlapsOverlapsRequired. Boolean.
json
{
  "input": {
    "contactStart": 10,
    "contactEnd": 30,
    "riskStart": 20,
    "riskEnd": 40
  },
  "output": {
    "overlap": 10,
    "overlaps": true
  }
}

Limitations and assumptions

  • Touching endpoints give zero overlap and overlaps = false. Numeric temporal overlap alone does not establish contact intensity, infection, an exposure event or a clinically meaningful risk window.
  • 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 an explicit calendar conversion for real dates and a suitable transmission or censoring model for inference beyond these local time calculations.

References

  1. Calculation and input contract: epidemiology/contact-risk-window-overlap-duration-term — tool.io

Similar or alternative tools