standalone implementation of ccalendar
State: closed

For the moment only updated cimports in `fields`.

- [ ] 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/18540?src=pr&el=h1) Report
> Merging [#18540](https://codecov.io/gh/pandas-dev/pandas/pull/18540?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/88ab6934e78117359719eb09c7d580906155575d?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #18540      +/-   ##
==========================================
- Coverage   91.35%   91.33%   -0.03%     
==========================================
  Files         164      164              
  Lines       49801    49801              
==========================================
- Hits        45494    45484      -10     
- Misses       4307     4317      +10
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.13% <ø> (-0.01%)` | :arrow_down: |
| #single | `40.81% <ø> (-0.07%)` | :arrow_down: |

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

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18540?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/18540?src=pr&el=footer). Last update [88ab693...d91ec05](https://codecov.io/gh/pandas-dev/pandas/pull/18540?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18540?src=pr&el=h1) Report
> Merging [#18540](https://codecov.io/gh/pandas-dev/pandas/pull/18540?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/695e89345a46c0cab06c479c83007f5adbb70ad5?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/18540/graphs/tree.svg?token=eZ4WkYLtcO&src=pr&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/18540?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #18540      +/-   ##
==========================================
- Coverage   91.59%   91.57%   -0.02%     
==========================================
  Files         153      153              
  Lines       51212    51212              
==========================================
- Hits        46908    46898      -10     
- Misses       4304     4314      +10
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.43% <ø> (-0.01%)` | :arrow_down: |
| #single | `40.67% <ø> (-0.11%)` | :arrow_down: |

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

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18540?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/18540?src=pr&el=footer). Last update [695e893...6b245cf](https://codecov.io/gh/pandas-dev/pandas/pull/18540?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

what PR was this originally implemented in?
> what PR was this originally implemented in?

#18489, but that was reverted as out-of-scope
Just pushed a commit that uses `ccalendar` functions to implement fastpaths for some of the `Timestamp` properties (ones not covered by #18539)

master
```
In [2]: ts = pd.Timestamp.now()
In [3]: %timeit ts.is_month_end
The slowest run took 34.08 times longer than the fastest. This could mean that an intermediate result is being cached.
10000 loops, best of 3: 26.8 µs per loop
```

PR 
```
In [2]: ts = pd.Timestamp.now()
In [3]: %timeit ts.is_month_end
The slowest run took 27.70 times longer than the fastest. This could mean that an intermediate result is being cached.
1000000 loops, best of 3: 1.19 µs per loop
```
> are you changing [monthrange] in this PR?

Hadn't planned on it.  Even if it shouldn't be used, ATM it still is used in a few places.  Besides I wrote a really nice docstring.
> Hadn't planned on it. Even if it shouldn't be used, ATM it still is used in a few places. Besides I wrote a really nice docstring.

what changed? we had this discussion about why returning a tuple is a bad idea 
> what changed? we had this discussion about why returning a tuple is a bad idea

Will remove.
rebase and will look again