ENH: linearly spaced date_range (GH 20808)
State: closed

- [X] closes #20808
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

Labels:
name: Enhancement
name: Datetime
description: Datetime data dtype

Comments:
For consistency, it seems like this behavior should also be implemented for `bdate_range`, `timedelta_range`, and `interval_range`.  Doesn't really make sense for `period_range`, since a freq is always required there, and can probably skip `cdate_range` since it's been deprecated (although not removed).
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20846?src=pr&el=h1) Report
> Merging [#20846](https://codecov.io/gh/pandas-dev/pandas/pull/20846?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/b02c69ac7309ccf63a17471b25475bf0c0ebe3c3?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `95%`.

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

```diff
@@            Coverage Diff             @@
##           master   #20846      +/-   ##
==========================================
+ Coverage   91.81%   91.81%   +<.01%     
==========================================
  Files         153      153              
  Lines       49478    49484       +6     
==========================================
+ Hits        45429    45435       +6     
  Misses       4049     4049
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.21% <95%> (ø)` | :arrow_up: |
| #single | `41.85% <70%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/20846?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/20846/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.76% <95%> (+0.02%)` | :arrow_up: |

------

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

Hello @onnoeberhard! Thanks for updating the PR.





Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on May 02, 2018 at 19:48 Hours UTC
Alright, thank you for all the feedback. I have implemented almost everything mentioned, except for the implementation of a similar feature in the functions `bdate_range`, `timedelta_range` and `interval_range`, because I have not yet used these functions and don't know how to properly implement it in an intuitive way.
I have moved everything to the DTI constructor. With that I have removed the functionality to declare kwargs to `to_datetime`, but I think it is much cleaner overall like this.
Why do the tests time out? Is my code responsible for that?
thank @onnoeberhard