-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
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
BusinessHour
offset 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
BusinessHour
will increment timestamp by hourly on the days belong toBusinessDay
offset.Specify Opening/Closing Hour
Allow to specify opening/closing time using
start
andend
keyword byhour:minute
string ordatetime.time
.Edge cases
onOffset
should 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:
BH
orH
normalize
tsplot(This can't be done without ENH: Cleanup backend for Offsets and Period #5148, skipped)rollback
androllforward
nanosecond
(minor issue, but currentapply_wraps
may add preservednanosecond
after the closing time)n
larger than business shoursstart
andend
test_apply_out_of_range
timezone check, which fails because of DST difference.