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

Function PyDate_from_int

python/pyarrow/src/arrow/python/datetime.cc:294–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294Status PyDate_from_int(int64_t val, const DateUnit unit, PyObject** out) {
295 int64_t year = 0, month = 0, day = 0;
296 RETURN_NOT_OK(PyDate_convert_int(val, unit, &year, &month, &day));
297 *out = PyDate_FromDate(static_cast<int32_t>(year), static_cast<int32_t>(month),
298 static_cast<int32_t>(day));
299 return Status::OK();
300}
301
302Status PyDateTime_from_int(int64_t val, const TimeUnit::type unit, PyObject** out) {
303 int64_t hour = 0, minute = 0, second = 0, microsecond = 0;

Callers 1

VisitMethod · 0.85

Calls 2

PyDate_convert_intFunction · 0.85
OKFunction · 0.50

Tested by

no test coverage detected