Skip to content

Main content

Interval Endpoint Unit Sharing Flag Tool

Only identical supplied endpoint unit labels may share a suffix.

Loading tool…

Description

Set canShare only when shareRequested and left/right unit strings match exactly; return the unit as suffix then, otherwise an empty suffix.

A unit label is text describing a quantity's intended scale. Joining tokens, adding powers or choosing spacing changes presentation; it does not convert the quantity, validate dimensional compatibility or verify a unit registry entry.

Set canShare only when shareRequested and left/right unit strings match exactly; return the unit as suffix then, otherwise an empty suffix.

When to use this tool

Use Interval Endpoint Unit Sharing Flag when you need a specific quantity-and-unit text convention.

How to use the tool and how it works

  1. Enter leftUnit, rightUnit, shareRequested. 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 canShare, suffix. Inspect canShare before interpreting the associated values.

Set canShare only when shareRequested and left/right unit strings match exactly; return the unit as suffix then, otherwise an empty suffix.1

Input fieldMeaning and unitsAccepted input
leftUnitLeft UnitRequired. Text; maximum UTF-16 length 8192.
rightUnitRight UnitRequired. Text; maximum UTF-16 length 8192.
shareRequestedShare RequestedRequired. Boolean.
Output fieldInterpretationReturned shape
canShareCan Share Unit: 1.Required. Boolean.
suffixShared literal unit or empty placeholder; inspect canShare.Required. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "leftUnit": "m",
    "rightUnit": "m",
    "shareRequested": true
  },
  "output": {
    "canShare": true,
    "suffix": "m"
  }
}

Limitations and assumptions

  • An empty suffix can be an actual empty matching unit or a false-case placeholder. Literal equality does not establish physical unit equivalence.
  • 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 unit-aware calculation for actual conversion and dimensional checks. Select a destination-appropriate typography and retain the intended unit meaning when preparing labels.

References

  1. Calculation and input contract: format/interval-endpoint-unit-sharing-flag — tool.io

Similar or alternative tools