BUG: can't resample with non-nano dateindex, out-of-nanosecond-bounds
- [ ] closes #51024 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

One comment on the non-test code, otherwise looks good.  i dont know the resample code well enough to know on sight if the test "expected" is correct, but trust you > One comment on the non-test code, otherwise looks good. i dont know the resample code well enough to know on sight if the test "expected" is correct, but trust you

Thanks for your review @jbrockmendel !

Regarding the expected value: it matches what pandas would currently give for nanosecond resolution:
```python
In [33]:     idx = date_range("1983-01-01", "2000-01-01", freq="Y")
    ...:     ser = Series([1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5], index=idx)
    ...:     ser.resample("2Y").mean()
Out[33]:
1983-12-31    1.0
1985-12-31    3.0
1987-12-31    6.5
1989-12-31    4.0
1991-12-31    3.0
1993-12-31    6.5
1995-12-31    4.0
1997-12-31    3.0
1999-12-31    6.5
Freq: 2A-DEC, dtype: float64
```

, so if that's right, then this is right.

OK to merge? Thanks @MarcoGorelli 