| 345 | } |
| 346 | |
| 347 | inline void FormatYYYY_MM_DD(arrow_vendored::date::year_month_day ymd, char** cursor) { |
| 348 | FormatTwoDigits(static_cast<unsigned>(ymd.day()), cursor); |
| 349 | FormatOneChar('-', cursor); |
| 350 | FormatTwoDigits(static_cast<unsigned>(ymd.month()), cursor); |
| 351 | FormatOneChar('-', cursor); |
| 352 | auto year = static_cast<int>(ymd.year()); |
| 353 | const auto is_neg_year = year < 0; |
| 354 | year = std::abs(year); |
| 355 | assert(year <= 99999); |
| 356 | FormatTwoDigits(year % 100, cursor); |
| 357 | year /= 100; |
| 358 | FormatTwoDigits(year % 100, cursor); |
| 359 | if (year >= 100) { |
| 360 | FormatOneDigit(year / 100, cursor); |
| 361 | } |
| 362 | if (is_neg_year) { |
| 363 | FormatOneChar('-', cursor); |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | template <typename Duration> |
| 368 | constexpr size_t BufferSizeHH_MM_SS() { |
no test coverage detected