Skip to main content

fractional_spec

Function fractional_spec 

Source
fn fractional_spec(precision: i32) -> &'static str
Expand description

The chrono fractional-seconds format specifier for a precision, or "" for precision 0 (whole seconds, no fractional part). A fixed-width specifier is used so the rendered fractional digits match the declared precision exactly. Precision 12 renders at nanosecond width, matching the truncation in duration_from_precision_units.