-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
ENH: Add BusinessHour offset #7905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
why would you not add this as an optional feature of |
|
Because units are different. A day in BDay, an hour in BusinessHour. |
|
@sinhrks ok, makes sense |
|
OK, I think this can be reviewed now. Considering to simplify the internal process, but API has been fixed as far as I'm concerned. |
309843a to
3b2d089
Compare
|
@sinhrks can you rebase / revisit |
|
Rebased. |
c8d4772 to
04f7e9b
Compare
|
@sinhrks let's rebase again; this looked ok |
5cc605e to
962df63
Compare
|
@jreback Thanks, rebased and now green. |
|
@sinhrks looks good. @jorisvandenbossche want to take a quick look thru docs? |
|
thanks @sinhrks very nice! |
Closes #2469. Create
BusinessHouroffset to specify business hours onBusinessDay. Appreciated if any feedbacks regarding bahaviours, keywords, etc.Basic
By default, use 9:00 - 17:00 as business hours. Adding
BusinessHourwill increment timestamp by hourly on the days belong toBusinessDayoffset.Specify Opening/Closing Hour
Allow to specify opening/closing time using
startandendkeyword byhour:minutestring ordatetime.time.Edge cases
onOffsetshould include both edges.If result is on the end-edge of business hour, move to next
In case of midnight business hour, distinguish the date by its opening hour
Remainings:
BHorHnormalizetsplot(This can't be done without ENH: Cleanup backend for Offsets and Period #5148, skipped)rollbackandrollforwardnanosecond(minor issue, but currentapply_wrapsmay add preservednanosecondafter the closing time)nlarger than business shoursstartandendtest_apply_out_of_rangetimezone check, which fails because of DST difference.