Description
Round fractional-second digits with carry.
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.
Round fractional-second digits with carry.
When to use this tool
Use Timestamp Fraction Rounding Second Carry when checking one explicit timestamp precision, rounding or carry convention.
How to use the tool and how it works
- Enter digits, width. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read digits, carry. Use the output convention below.
Round fractional-second digits with carry. Require 1-64 decimal digits and width in [0,min(32,length)]; retain width digits, round up when the next digit >= 5 using exact integers and report carry plus zero-padded remainder.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| digits | Digits | Required. Text; maximum UTF-16 length 8192. |
| width | Extent on the stated coordinate or temporal basis. | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| digits | Digits | Required. Text; maximum UTF-16 length 8192. |
| carry | One when rounding overflows the fractional second, otherwise zero; width zero yields empty digits. | Required. Safe integer. |
{
"input": {
"digits": "9996",
"width": 3
},
"output": {
"digits": "000",
"carry": 1
}
} Limitations and assumptions
- This is half-up rounding of a nonnegative fraction; width zero returns empty digits and possible whole-second carry.
- 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.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
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
- Datetime Minute Rounding Day Carry
Round valid civil time to the nearest minute.
- Civil Time Millisecond Tie Carry
Round one second and millisecond pair under up or even tie policy.