Skip to content

Main content

Date: Timestamp Fractional Second Digit Count Tool

Count lexical fractional-second digits in one strict HH:MM:SS[.digits][Z] token, retaining trailing zeros without timestamp conversion.

Loading tool…

Description

Count written fractional-second digits in a restricted time token.

Timestamp notation distinguishes written precision, quantization and carry into the next larger field. Padding a fraction, rounding it and propagating an end-of-day marker are different operations and do not establish clock accuracy.

Count written fractional-second digits in a restricted time token.

When to use this tool

Use Date: Timestamp Fractional Second Digit Count when checking one explicit timestamp precision, rounding or carry convention.

How to use the tool and how it works

  1. Enter timeToken. 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.

Count written fractional-second digits in a restricted time token. Accept HH:MM:SS, optional 1-18-digit fraction and optional Z; validate hour/minute/second and return fractionDigits or zero.1

Input fieldMeaning and unitsAccepted input
timeTokenTime TokenRequired. Text. 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.fractionDigitsFraction DigitsCalculated result member: number.
json
{
  "input": {
    "timeToken": "12:30:45.0010Z"
  },
  "output": {
    "result": {
      "fractionDigits": 4
    }
  }
}

Limitations and assumptions

  • Leap seconds, offsets and dates are rejected; written precision is not measurement accuracy.
  • 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 complete date-time arithmetic when a carry must change a date or interact with timezone transitions.

References

  1. Calculation and input contract: date/timestamp-fractional-second-digit-count — tool.io

Similar or alternative tools