title: compute time difference of DateTimeIndex
body: <p>I want to compute the time difference between times in a DateTimeIndex</p>
  
  <pre><code>import pandas as pd
  p = pd.DatetimeIndex(['1985-11-14', '1985-11-28', '1985-12-14', '1985-12-28'], dtype='datetime64[ns]')
  </code></pre>
  
  <p>I can compute the time difference of two times:</p>
  
  <pre><code>p[1] - p[0]
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>Timedelta('14 days 00:00:00')
  </code></pre>
  
  <p>But p[1:] - p[:-1] doesn't work and gives</p>
  
  <pre><code>DatetimeIndex(['1985-12-28'], dtype='datetime64[ns]', freq=None)
  </code></pre>
  
  <p>and a future warning: </p>
  
  <pre><code>FutureWarning: using '-' to provide set differences with datetimelike Indexes is deprecated, use .difference()
  </code></pre>
  
  <p>Any thought on how how I can (easily) compute the time difference between values in a DateTimeIndex? And why does it work for 1 value, but not for the entire DateTimeIndex?</p>