Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
"$BASE_DIR"/scripts/validate_docstrings.py \
--format=actions \
-i ES01 `# For now it is ok if docstrings are missing the extended summary` \
-i "pandas.tseries.offsets.BusinessHour PR02,SA01" \
-i "pandas.tseries.offsets.CustomBusinessHour PR02,SA01" \
-i "pandas.tseries.offsets.FY5253Quarter.is_on_offset GL08" \
-i "pandas.tseries.offsets.LastWeekOfMonth.is_on_offset GL08" \
Expand Down
1 change: 1 addition & 0 deletions doc/source/reference/offset_frequency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Properties
BusinessHour.normalize
BusinessHour.rule_code
BusinessHour.n
BusinessHour.offset
BusinessHour.start
BusinessHour.end
BusinessHour.weekmask
Expand Down
14 changes: 13 additions & 1 deletion pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,12 @@ cdef class BusinessHour(BusinessMixin):
"""
DateOffset subclass representing possibly n business hours.
Parameters
BusinessHour is a date offset that advances time by a number of business
hours. By default, business hours are from 9:00 AM to 5:00 PM on weekdays.
The ``start`` and ``end`` parameters can be used to customize the business
hours window, and multiple intervals can be specified by passing lists.
Attributes
----------
n : int, default 1
The number of hours represented.
Expand All @@ -2618,6 +2623,13 @@ cdef class BusinessHour(BusinessMixin):
offset : timedelta, default timedelta(0)
Time offset to apply.
See Also
--------
:class:`~pandas.tseries.offsets.CustomBusinessHour` :
DateOffset subclass with custom weekmask and holidays.
:class:`~pandas.tseries.offsets.BusinessDay` :
DateOffset subclass representing possibly n business days.
Examples
--------
You can use the parameter ``n`` to represent a shift of n hours.
Expand Down
Loading