@@ -293,46 +293,6 @@ that the dates have been converted to UTC
293
293
294
294
pd.to_datetime(["2015-11-18 15:30:00+05:30", "2015-11-18 16:30:00+06:30"], utc=True)
295
295
296
- .. _whatsnew_0240.api_breaking.calendarday:
297
-
298
- CalendarDay Offset
299
- ^^^^^^^^^^^^^^^^^^
300
-
301
- :class:`Day` and associated frequency alias ``'D'`` were documented to represent
302
- a calendar day; however, arithmetic and operations with :class:`Day` sometimes
303
- respected absolute time instead (i.e. ``Day(n)`` and acted identically to ``Timedelta(days=n)``).
304
-
305
- *Previous Behavior*:
306
-
307
- .. code-block:: ipython
308
-
309
-
310
- In [2]: ts = pd.Timestamp('2016-10-30 00:00:00', tz='Europe/Helsinki')
311
-
312
- # Respects calendar arithmetic
313
- In [3]: pd.date_range(start=ts, freq='D', periods=3)
314
- Out[3]:
315
- DatetimeIndex(['2016-10-30 00:00:00+03:00', '2016-10-31 00:00:00+02:00',
316
- '2016-11-01 00:00:00+02:00'],
317
- dtype='datetime64[ns, Europe/Helsinki]', freq='D')
318
-
319
- # Respects absolute arithmetic
320
- In [4]: ts + pd.tseries.frequencies.to_offset('D')
321
- Out[4]: Timestamp('2016-10-30 23:00:00+0200', tz='Europe/Helsinki')
322
-
323
- :class:`CalendarDay` and associated frequency alias ``'CD'`` are now available
324
- and respect calendar day arithmetic while :class:`Day` and frequency alias ``'D'``
325
- will now respect absolute time (:issue:`22274`, :issue:`20596`, :issue:`16980`, :issue:`8774`)
326
- See the :ref:`documentation here <timeseries.dayvscalendarday>` for more information.
327
-
328
- Addition with :class:`CalendarDay` across a daylight savings time transition:
329
-
330
- .. ipython:: python
331
-
332
- ts = pd.Timestamp('2016-10-30 00:00:00', tz='Europe/Helsinki')
333
- ts + pd.offsets.Day(1)
334
- ts + pd.offsets.CalendarDay(1)
335
-
336
296
.. _whatsnew_0240.api_breaking.period_end_time:
337
297
338
298
Time values in ``dt.end_time`` and ``to_timestamp(how='end')``
0 commit comments