MCPcopy Create free account
hub / github.com/apache/arrow / FormatHH_MM_SS

Function FormatHH_MM_SS

cpp/src/arrow/util/formatting.h:375–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373
374template <typename Duration>
375void 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.

Callers 2

operator()Method · 0.85
operator()Method · 0.85

Calls 5

Digits10Function · 0.85
FormatOneCharFunction · 0.85
FormatTwoDigitsFunction · 0.85
countMethod · 0.45

Tested by

no test coverage detected