Skip to content

CustomBusinessHour accepts a time as start and end #396

Closed
@gandhis1

Description

@gandhis1

This requires updating the docs in pandas as well, because it is not accurate: https://pandas.pydata.org/docs/reference/api/pandas.tseries.offsets.CustomBusinessHour.html

import pandas as pd
from datetime import time
a = time(6, 0)
b = time(14, 0)

In: pd.tseries.offsets.CustomBusinessHour(start=a, end=b)
Out: <CustomBusinessHour: CBH=06:00-14:00>

Example error:

error: Argument "start" to "CustomBusinessHour" has incompatible type "Optional[time]"; expected "str"
error: Argument "end" to "CustomBusinessHour" has incompatible type "Optional[time]"; expected "str"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions