Skip to content

Main content

Date Interval Single Day Closure Label Tool

Compute date interval single day closure label from explicit bounded inputs.

Loading tool…

Description

Count civil days under a supplied endpoint convention.

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.

Count civil days under a supplied endpoint convention.

When to use this tool

Use Date Interval Single Day Closure Label when checking a supplied date-label, duration or interval convention.

How to use the tool and how it works

  1. Enter start, end, includeStart, includeEnd. 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 days, empty. Inspect empty before interpreting the associated values.

Count civil days under a supplied endpoint convention. Validate ordered dates; days = max(0,elapsedDays-1+includeStart+includeEnd), and empty tests zero.1

Input fieldMeaning and unitsAccepted input
startStartRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
endEndRequired. Text; maximum UTF-16 length 8192. Real proleptic Gregorian YYYY-MM-DD; four-digit years 0000-9999 accepted.
includeStartInclude StartRequired. Boolean.
includeEndInclude EndRequired. Boolean.
Output fieldInterpretationReturned shape
daysDaysRequired. Safe integer.
emptyTrue for a coincident day unless both endpoints are included; follows the documented discrete-day convention.Required. Boolean.
json
{
  "input": {
    "start": "2024-01-01",
    "end": "2024-01-03",
    "includeStart": true,
    "includeEnd": true
  },
  "output": {
    "days": 3,
    "empty": false
  }
}

Limitations and assumptions

  • Coincident endpoints require both inclusion flags to count one; no business-day or jurisdictional rule is applied.
  • 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-interval-single-day-closure-label — tool.io

Similar or alternative tools