import from np_datetime instead of src/datetime
State: closed

There are a handful of things where there is an option to cimport from either tslibs.np_datetime or src/datetime.pxd.  This PR updates imports use tslibs.np_datetime where possible.

Exposes NPY_NAT in nattype.pxd so other modules can cimport it from there instead of using util.get_nat().  Thematically `nattype` is the appropriate place for this to come from.

I don't think this has any overlaps with #18298.

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Datetime
description: Datetime data dtype
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=h1) Report
> Merging [#18312](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c2590b346a7f8e9c0e2e7efa1d5c7318f73fa982?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/18312/graphs/tree.svg?height=150&token=eZ4WkYLtcO&width=650&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #18312      +/-   ##
==========================================
- Coverage   91.39%   91.38%   -0.02%     
==========================================
  Files         164      164              
  Lines       49854    49854              
==========================================
- Hits        45566    45557       -9     
- Misses       4288     4297       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.18% <ø> (ø)` | :arrow_up: |
| #single | `39.44% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=footer). Last update [c2590b3...6d297f1](https://codecov.io/gh/pandas-dev/pandas/pull/18312?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks!
> sure these are like dateutils

Really?  I was expecting a "no" because it would be duplicating stuff already in src/datetime/np_datetime, but if that's the go-ahead, then I'll put that together this week.  Name-wise I was thinking `ccalendar` by analogy with `cchardet` (hence the branch name).

well i wouldn’t duplicate stuff rather should be orthogonal - maybe not sure what u r proposing here
No worries, I've got plenty of other stuff to work on, will get distracted by something shiny and forget about this idea.