Skip to content

Main content

Onset Date Partial Interval Width Tool

Width of a supplied partial onset-date interval under an explicit inclusive-day convention.

Loading tool…

Description

Return width = latestDay - earliestDay, adding one when inclusiveDays is true.

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 width = latestDay - earliestDay, adding one when inclusiveDays is true.

When to use this tool

Use Onset Date Partial Interval Width when reconciling supplied day coordinates, observation windows or interval boundaries.

How to use the tool and how it works

  1. Enter earliestDay, latestDay, inclusiveDays. 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 width. Use the output convention below.

Require latestDay >= earliestDay. Return width = latestDay - earliestDay, adding one when inclusiveDays is true. Use matching day coordinates; inclusiveDays counts both integer day endpoints, while false returns their elapsed separation.1

Input fieldMeaning and unitsAccepted input
earliestDayEarliest DayRequired. Safe integer.
latestDayLatest DayRequired. Safe integer.
inclusiveDaysInclusive DaysRequired. Boolean.
Output fieldInterpretationReturned shape
widthWidthRequired. Safe integer.
json
{
  "input": {
    "earliestDay": 100,
    "latestDay": 105,
    "inclusiveDays": true
  },
  "output": {
    "width": 6
  }
}

Limitations and assumptions

  • This calculates a supplied interval width, not uncertainty inferred from records. Fractional coordinates remain arithmetic inputs; adding one is meaningful as inclusive day counting only for appropriate whole-day endpoints.
  • 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/onset-date-partial-interval-width — tool.io

Similar or alternative tools

  • Generation Interval Explicit Anchor Pair

    The interval is infecteeInfection - infectorInfection; minimumInterval subtracts both infectorUncertainty and infecteeUncertainty, while maximumInterval adds both.

  • Epidemic Curve Bin Date

    Assign a date to an explicitly anchored fixed-day epidemic-curve bin using floor and a half-open bin convention.