| 373 | |
| 374 | template <typename Duration> |
| 375 | void FormatHH_MM_SS(arrow_vendored::date::hh_mm_ss<Duration> hms, char** cursor) { |
| 376 | constexpr size_t subsecond_digits = Digits10(Duration::period::den) - 1; |
| 377 | if (subsecond_digits != 0) { |
| 378 | FormatAllDigitsLeftPadded(hms.subseconds().count(), subsecond_digits, '0', cursor); |
| 379 | FormatOneChar('.', cursor); |
| 380 | } |
| 381 | FormatTwoDigits(hms.seconds().count(), cursor); |
| 382 | FormatOneChar(':', cursor); |
| 383 | FormatTwoDigits(hms.minutes().count(), cursor); |
| 384 | FormatOneChar(':', cursor); |
| 385 | FormatTwoDigits(hms.hours().count(), cursor); |
| 386 | } |
| 387 | |
| 388 | // Some out-of-bound datetime values would result in erroneous printing |
| 389 | // because of silent integer wraparound in the `arrow_vendored::date` library. |
no test coverage detected