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
- Enter timeToken. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| timeToken | Time Token | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned object; expand its named members below. | Required. Object. |
| result.fractionDigits | Fraction Digits | Calculated result member: number. |
{
"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
Similar or alternative tools
- Timestamp Fraction Rightpad Without Rounding
Right-pad a fractional digit string without rounding.
- Timestamp Subsecond Tick Divisibility
Check a nanosecond fraction against a supplied tick quantum.