| 261 | } |
| 262 | |
| 263 | static inline Status PyDate_convert_int(int64_t val, const DateUnit unit, int64_t* year, |
| 264 | int64_t* month, int64_t* day) { |
| 265 | switch (unit) { |
| 266 | case DateUnit::MILLI: |
| 267 | val /= 86400000LL; // fall through |
| 268 | case DateUnit::DAY: |
| 269 | get_date_from_days(val, year, month, day); |
| 270 | default: |
| 271 | break; |
| 272 | } |
| 273 | return Status::OK(); |
| 274 | } |
| 275 | |
| 276 | PyObject* NewMonthDayNanoTupleType() { |
| 277 | if (MonthDayNanoTupleType.tp_name == nullptr) { |
no test coverage detected