| 465 | |
| 466 | template <typename Duration> |
| 467 | static inline bool ParseHH(const char* s, Duration* out) { |
| 468 | uint8_t hours = 0; |
| 469 | if (ARROW_PREDICT_FALSE(!ParseUnsigned(s + 0, 2, &hours))) { |
| 470 | return false; |
| 471 | } |
| 472 | if (ARROW_PREDICT_FALSE(hours >= 24)) { |
| 473 | return false; |
| 474 | } |
| 475 | *out = std::chrono::duration_cast<Duration>(std::chrono::hours(hours)); |
| 476 | return true; |
| 477 | } |
| 478 | |
| 479 | template <typename Duration> |
| 480 | static inline bool ParseHH_MM(const char* s, Duration* out) { |
no test coverage detected