BUG: Indexing Pandas dataframe via timestamps - inclusive at either end of range
- [x] I have checked that this issue has not already been reported.

- [ x] I have confirmed this bug exists on the latest version of pandas.

- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.

---

**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.

#### Code Sample, a copy-pastable example

```python
import pandas as pd
import numpy as np

# Integer indexing, non-inclusive  i1 <= i < i2
dfi = pd.DateFrame(np.cumsum(np.ones(3))
print(dfi[0:2])
 
"""
    0
0  1.0
0  2.0
"""

# Indexing via timestamp inclusive at both ends t1 <= t <= t2

idx = pd.date_range('2020/1/1','2020/1/3')
df = pd.DataFrame(np.cumsum(np.ones(3)),index = idx)
print(df[idx[0]:idx[2])

"""
             0
2020-01-01  1.0
2020-01-02  2.0
2020-01-03  3.0
"""


```

#### Problem description

If I have a pandas dataframe that is indexed by timestamps, and I specify a slice based on two timestamps (t1,t2) eg:

df[t1:t2] then I find that the slice is inclusive of both t1 and t2, ie it selects all items for which t1 <= t <= t2

However if it is indexed by integers, i1, i2, then df[i1:i2] selects all i where t1<=i<t2  ie is inclusive at the higher end

Is the behaviour for timestamps by design or a bug?  It leads to incorrect code, for example if I have two adjacent time windows (t1,t2) and (t2,t3) then if one of the items in the dataframe is indexed at exactly t2, that item appears in both windows.



#### Expected Output

Example:

I have a Pandas dataframe df, where the index is a timestamp.

If I then do 

len(df[df.index[0]:df.index[2]], 

then the result is three, having selected the elements at index[0] index[1] and index[2]

But if it is indexed by an integer,  then the result is 2 as I expect, so points at the boundary aren't double counted.

I do not know if this is designed behaviour

