Description
Code Sample, a copy-pastable example if possible
# Your code here
import pandas as pd # My pandas version is 0.19.2
from pandas.tseries.holiday import USFederalHolidayCalendar
from pandas.tseries.offsets import CustomBusinessHour
import datetime as dt
bhour_us = CustomBusinessHour(calendar=USFederalHolidayCalendar())
# Friday before MLK Day
t0 = dt.datetime(2014, 1, 17, 15)
# This is still right
# Expected Result: Timestamp('2014-01-21 14:00:00')
# print(t0 + bhour_us * 7 )
# This is wrong
# Expected Result: Timestamp('2014-01-21 15:00:00')
print(t0 + bhour_us * 8)
# But the code generates: Timestamp('2014-01-20 15:00:00')
Problem description
I used a Timestamp one day prior to a Holiday as t0. When offset it by number of hours that is less than the number of hours of a business day, pandas correctly accounts for the holidays, but when the number of hours in the offset is equal or larger than number of hours of a business day, pandas gives one day prior to the correct result.
Expected Output
Timestamp('2014-01-21 15:00:00')
Output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.4.5.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.11.3
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: 5.1.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.2.0
tables: 3.2.2
numexpr: 2.6.1
matplotlib: 2.0.0
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.2
bs4: 4.5.3
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.1.5
pymysql: None
psycopg2: None
jinja2: 2.9.4
boto: 2.45.0
pandas_datareader: None