@@ -111,7 +111,10 @@ def offset_types(self):
111
111
112
112
def _get_offset (self , klass , value = 1 , normalize = False ):
113
113
# create instance from offset class
114
- if klass is FY5253 or klass is FY5253Quarter :
114
+ if klass is FY5253 :
115
+ klass = klass (n = value , startingMonth = 1 , weekday = 1 ,
116
+ variation = 'last' , normalize = normalize )
117
+ elif klass is FY5253Quarter :
115
118
klass = klass (n = value , startingMonth = 1 , weekday = 1 ,
116
119
qtr_with_extra_week = 1 , variation = 'last' ,
117
120
normalize = normalize )
@@ -2629,7 +2632,7 @@ def test_offset(self):
2629
2632
2630
2633
def test_day_of_month (self ):
2631
2634
dt = datetime (2007 , 1 , 1 )
2632
- offset = MonthEnd (day = 20 )
2635
+ offset = MonthEnd ()
2633
2636
2634
2637
result = dt + offset
2635
2638
assert result == Timestamp (2007 , 1 , 31 )
@@ -3678,7 +3681,7 @@ def test_onOffset(self):
3678
3681
1 , startingMonth = 8 , weekday = WeekDay .THU ,
3679
3682
qtr_with_extra_week = 4 )
3680
3683
offset_n = FY5253 (weekday = WeekDay .TUE , startingMonth = 12 ,
3681
- variation = "nearest" , qtr_with_extra_week = 4 )
3684
+ variation = "nearest" )
3682
3685
3683
3686
tests = [
3684
3687
# From Wikipedia
0 commit comments