Skip to content

API: Make 'D' & offsets.Day always operate as calendar day instead of 24 Hour #22864

Closed
@mroeschke

Description

@mroeschke

From the dev-chat #22274 (comment) and a rehash of #20633

Conclusion:

  • Make the offset alias 'D' and offsets.Day always operate as a calendar day.

Technical implication:

  • Day will need to subclass DateOffset instead of Tick

Operations that will change behavior (may be missing some):

  1. Day arithmetic with Timestamp/DTI/datetime Series/DataFrame
  2. DatetimeIndex.shift
  3. Any use of 'D' with Timedelta/TDI/timedelta Series/DataFrame
  4. Tick arithmetic with Day

Deprecation Procedures (could use some input here)

  1. None
  2. None
  3. DeprecationWarning that users should use '24 H' instead of 'D' and allow users to use 'D' for v0.24.0
  4. None

cc @pandas-dev/pandas-core

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions