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

Function IsDateTimeInRange

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

Source from the content-addressed store, hash-verified

396// https://en.cppreference.com/w/cpp/chrono/year_month_day/operator_days
397template <typename Unit>
398bool IsDateTimeInRange(Unit duration) {
399 constexpr Unit kMinIncl =
400 std::chrono::duration_cast<Unit>(arrow_vendored::date::days{-12687428});
401 constexpr Unit kMaxExcl =
402 std::chrono::duration_cast<Unit>(arrow_vendored::date::days{11248738});
403 return duration >= kMinIncl && duration < kMaxExcl;
404}
405
406// IsDateTimeInRange() specialization for nanoseconds: a 64-bit number of
407// nanoseconds cannot represent years outside of the [-32767, 32767]

Callers 3

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

Calls

no outgoing calls

Tested by

no test coverage detected