@@ -472,9 +472,9 @@ def _set_busdaycalendar(self):
472
472
kwargs = {'weekmask' :self .weekmask ,'holidays' :self .holidays }
473
473
else :
474
474
kwargs = {'weekmask' :self .weekmask }
475
- try :
475
+ try :
476
476
self .busdaycalendar = np .busdaycalendar (** kwargs )
477
- except :
477
+ except :
478
478
# Check we have the required numpy version
479
479
from distutils .version import LooseVersion
480
480
@@ -484,9 +484,9 @@ def _set_busdaycalendar(self):
484
484
np .__version__ )
485
485
else :
486
486
raise
487
-
487
+
488
488
def __getstate__ (self ):
489
- """" Return a pickleable state"""
489
+ """Return a pickleable state"""
490
490
state = self .__dict__ .copy ()
491
491
del state ['busdaycalendar' ]
492
492
return state
@@ -520,7 +520,7 @@ def apply(self, other):
520
520
if self .offset :
521
521
result = result + self .offset
522
522
523
- return result
523
+ return as_timestamp ( result )
524
524
525
525
elif isinstance (other , np .datetime64 ):
526
526
dtype = other .dtype
@@ -539,7 +539,7 @@ def apply(self, other):
539
539
if self .offset :
540
540
result = result + self .offset
541
541
542
- return result
542
+ return as_timestamp ( result )
543
543
544
544
elif isinstance (other , (timedelta , Tick )):
545
545
return BDay (self .n , offset = self .offset + other ,
@@ -639,7 +639,7 @@ def apply(self, other):
639
639
640
640
if other .weekday () > 4 :
641
641
other = other - BDay ()
642
- return other
642
+ return as_timestamp ( other )
643
643
644
644
_prefix = 'BM'
645
645
@@ -706,7 +706,7 @@ def isAnchored(self):
706
706
707
707
def apply (self , other ):
708
708
if self .weekday is None :
709
- return as_datetime (other ) + self .n * self ._inc
709
+ return as_timestamp ( as_datetime (other ) + self .n * self ._inc )
710
710
711
711
if self .n > 0 :
712
712
k = self .n
@@ -998,7 +998,7 @@ def apply(self, other):
998
998
if other .weekday () > 4 :
999
999
other = other - BDay ()
1000
1000
1001
- return other
1001
+ return as_timestamp ( other )
1002
1002
1003
1003
def onOffset (self , dt ):
1004
1004
modMonth = (dt .month - self .startingMonth ) % 3
@@ -1188,7 +1188,7 @@ def apply(self, other):
1188
1188
if result .weekday () > 4 :
1189
1189
result = result - BDay ()
1190
1190
1191
- return result
1191
+ return as_timestamp ( result )
1192
1192
1193
1193
1194
1194
class BYearBegin (YearOffset ):
0 commit comments