Skip to content

DOC: explain BusinessHour carry-over for non-whole-hour business hours (GH#60596) - #71951

Draft
jbrockmendel wants to merge 1 commit into
pandas-dev:mainfrom
jbrockmendel:bug-60596
Draft

jbrockmendel wants to merge 1 commit into
pandas-dev:mainfrom
jbrockmendel:bug-60596

Conversation

@jbrockmendel

Copy link
Copy Markdown
Member

closes #60596

BusinessHour(n) advances by n * 60 minutes of business time, so part of an hour that does not fit before closing continues from the next opening. With business hours that are not a whole number of hours long (e.g. 09:30-16:00), a date_range drifts off the opening time after the first day. This is intended, and additive (ts + BH(2) == ts + BH() + BH()), but only shown indirectly in the user guide and not mentioned in the docstrings.

  • BusinessHour / CustomBusinessHour docstrings: one sentence plus an example of the carry-over.
  • User guide: the same explanation with a date_range example, and a note that a 24-hour business day can't be expressed, pointing to filtering an hourly range on day_of_week instead (the use case in the issue).

GH-42399 reports the same behavior.

AI disclosure: drafted with Claude Code (claude opus 5.5 (high)), which investigated the issue, confirmed the behavior is by design, and wrote the doc changes.

…s (GH#60596)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: unable to generate daily business frequency data

1 participant