Skip to content

Main content

Date: Date Span Touching Boundary Flag Tool

Distinguish exact boundary contact from positive-length overlap between two nonempty half-open civil-date spans; no timezone or business-day interpretation.

Loading tool…

Description

Distinguish touching date spans from positive-length overlap.

Date labels and intervals depend on origins, endpoint inclusion and calendar versus elapsed-time conventions. Numeric serial periods and local token formats can represent useful bookkeeping without resolving a real instant or official fiscal rule.

Distinguish touching date spans from positive-length overlap.

When to use this tool

Use Date: Date Span Touching Boundary Flag when checking a supplied date-label, duration or interval 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 result. Expand result to inspect the returned fields.

Distinguish touching date spans from positive-length overlap. Validate both date-only intervals with strict start < end; touching compares adjoining endpoints, overlap requires max(starts) < min(ends).1

Input fieldMeaning and unitsAccepted input
firstStartFirst StartRequired. Text. Real Gregorian YYYY-MM-DD; years 0001-9999 accepted. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
firstEndFirst EndRequired. Text. Real Gregorian YYYY-MM-DD; years 0001-9999 accepted. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
secondStartSecond StartRequired. Text. Real Gregorian YYYY-MM-DD; years 0001-9999 accepted. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
secondEndSecond EndRequired. Text. Real Gregorian YYYY-MM-DD; years 0001-9999 accepted. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultReturned object; expand its named members below.Required. Object.
result.touchingTouchingCalculated result member: boolean.
result.positiveLengthOverlapPositive Length OverlapCalculated result member: boolean.
json
{
  "input": {
    "firstStart": "2024-01-01",
    "firstEnd": "2024-01-03",
    "secondStart": "2024-01-03",
    "secondEnd": "2024-01-05"
  },
  "output": {
    "result": {
      "touching": true,
      "positiveLengthOverlap": false
    }
  }
}

Limitations and assumptions

  • This uses elapsed half-open-style boundaries and does not count a shared endpoint as positive overlap.
  • Outputs are nested inside result. 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.

Alternative or Complementary methods

Use a complete date/time implementation and the applicable calendar policy for actual scheduling and interval interpretation.

References

  1. Calculation and input contract: date/date-span-touching-boundary-flag — tool.io

Similar or alternative tools