@@ -291,7 +291,7 @@ def _from_name(cls, suffix=None):
291
291
return cls ()
292
292
293
293
294
- class BusinessDay (CacheableOffset , SingleConstructorOffset ):
294
+ class BusinessDay (SingleConstructorOffset ):
295
295
"""
296
296
DateOffset subclass representing possibly n business days
297
297
"""
@@ -399,7 +399,7 @@ def apply(self, other):
399
399
n -= 5 * k
400
400
if n == 0 and result .weekday () > 4 :
401
401
n -= 1
402
-
402
+
403
403
while n != 0 :
404
404
k = n // abs (n )
405
405
result = result + timedelta (k )
@@ -548,7 +548,7 @@ def name(self):
548
548
return "%s-%s" % (self .rule_code , _int_to_month [self .n ])
549
549
550
550
551
- class MonthEnd (CacheableOffset , MonthOffset ):
551
+ class MonthEnd (MonthOffset ):
552
552
"""DateOffset of one month end"""
553
553
554
554
def apply (self , other ):
@@ -572,7 +572,7 @@ def onOffset(cls, dt):
572
572
_prefix = 'M'
573
573
574
574
575
- class MonthBegin (CacheableOffset , MonthOffset ):
575
+ class MonthBegin (MonthOffset ):
576
576
"""DateOffset of one month at beginning"""
577
577
578
578
def apply (self , other ):
@@ -591,7 +591,7 @@ def onOffset(cls, dt):
591
591
_prefix = 'MS'
592
592
593
593
594
- class BusinessMonthEnd (CacheableOffset , MonthOffset ):
594
+ class BusinessMonthEnd (MonthOffset ):
595
595
"""DateOffset increments between business EOM dates"""
596
596
597
597
def isAnchored (self ):
@@ -619,7 +619,7 @@ def apply(self, other):
619
619
_prefix = 'BM'
620
620
621
621
622
- class BusinessMonthBegin (CacheableOffset , MonthOffset ):
622
+ class BusinessMonthBegin (MonthOffset ):
623
623
"""DateOffset of one business month at beginning"""
624
624
625
625
def apply (self , other ):
@@ -654,7 +654,7 @@ def onOffset(cls, dt):
654
654
_prefix = 'BMS'
655
655
656
656
657
- class Week (CacheableOffset , DateOffset ):
657
+ class Week (DateOffset ):
658
658
"""
659
659
Weekly offset
660
660
@@ -744,7 +744,7 @@ class WeekDay(object):
744
744
_weekday_to_int = dict ((v , k ) for k , v in _int_to_weekday .items ())
745
745
746
746
747
- class WeekOfMonth (CacheableOffset , DateOffset ):
747
+ class WeekOfMonth (DateOffset ):
748
748
"""
749
749
Describes monthly dates like "the Tuesday of the 2nd week of each month"
750
750
@@ -830,7 +830,7 @@ def _from_name(cls, suffix=None):
830
830
weekday = _weekday_to_int [suffix [1 :]]
831
831
return cls (week = week , weekday = weekday )
832
832
833
- class LastWeekOfMonth (CacheableOffset , DateOffset ):
833
+ class LastWeekOfMonth (DateOffset ):
834
834
"""
835
835
Describes monthly dates in last week of month like "the last Tuesday of each month"
836
836
@@ -940,7 +940,7 @@ def rule_code(self):
940
940
return '%s-%s' % (self ._prefix , _int_to_month [self .startingMonth ])
941
941
942
942
943
- class BQuarterEnd (CacheableOffset , QuarterOffset ):
943
+ class BQuarterEnd (QuarterOffset ):
944
944
"""DateOffset increments between business Quarter dates
945
945
startingMonth = 1 corresponds to dates like 1/31/2007, 4/30/2007, ...
946
946
startingMonth = 2 corresponds to dates like 2/28/2007, 5/31/2007, ...
@@ -999,7 +999,7 @@ def onOffset(self, dt):
999
999
1000
1000
1001
1001
# TODO: This is basically the same as BQuarterEnd
1002
- class BQuarterBegin (CacheableOffset , QuarterOffset ):
1002
+ class BQuarterBegin (QuarterOffset ):
1003
1003
_outputName = "BusinessQuarterBegin"
1004
1004
# I suspect this is wrong for *all* of them.
1005
1005
_default_startingMonth = 3
@@ -1036,7 +1036,7 @@ def apply(self, other):
1036
1036
return as_timestamp (result )
1037
1037
1038
1038
1039
- class QuarterEnd (CacheableOffset , QuarterOffset ):
1039
+ class QuarterEnd (QuarterOffset ):
1040
1040
"""DateOffset increments between business Quarter dates
1041
1041
startingMonth = 1 corresponds to dates like 1/31/2007, 4/30/2007, ...
1042
1042
startingMonth = 2 corresponds to dates like 2/28/2007, 5/31/2007, ...
@@ -1077,7 +1077,7 @@ def onOffset(self, dt):
1077
1077
return MonthEnd ().onOffset (dt ) and modMonth == 0
1078
1078
1079
1079
1080
- class QuarterBegin (CacheableOffset , QuarterOffset ):
1080
+ class QuarterBegin (QuarterOffset ):
1081
1081
_outputName = 'QuarterBegin'
1082
1082
_default_startingMonth = 3
1083
1083
_from_name_startingMonth = 1
@@ -1129,7 +1129,7 @@ def rule_code(self):
1129
1129
return '%s-%s' % (self ._prefix , _int_to_month [self .month ])
1130
1130
1131
1131
1132
- class BYearEnd (CacheableOffset , YearOffset ):
1132
+ class BYearEnd (YearOffset ):
1133
1133
"""DateOffset increments between business EOM dates"""
1134
1134
_outputName = 'BusinessYearEnd'
1135
1135
_default_month = 12
@@ -1166,7 +1166,7 @@ def apply(self, other):
1166
1166
return result
1167
1167
1168
1168
1169
- class BYearBegin (CacheableOffset , YearOffset ):
1169
+ class BYearBegin (YearOffset ):
1170
1170
"""DateOffset increments between business year begin dates"""
1171
1171
_outputName = 'BusinessYearBegin'
1172
1172
_default_month = 1
@@ -1198,7 +1198,7 @@ def apply(self, other):
1198
1198
return as_timestamp (datetime (other .year , self .month , first ))
1199
1199
1200
1200
1201
- class YearEnd (CacheableOffset , YearOffset ):
1201
+ class YearEnd (YearOffset ):
1202
1202
"""DateOffset increments between calendar year ends"""
1203
1203
_default_month = 12
1204
1204
_prefix = 'A'
@@ -1254,7 +1254,7 @@ def onOffset(self, dt):
1254
1254
return self .month == dt .month and dt .day == days_in_month
1255
1255
1256
1256
1257
- class YearBegin (CacheableOffset , YearOffset ):
1257
+ class YearBegin (YearOffset ):
1258
1258
"""DateOffset increments between calendar year begin dates"""
1259
1259
_default_month = 1
1260
1260
_prefix = 'AS'
@@ -1300,7 +1300,7 @@ def onOffset(self, dt):
1300
1300
return dt .month == self .month and dt .day == 1
1301
1301
1302
1302
1303
- class FY5253 (CacheableOffset , DateOffset ):
1303
+ class FY5253 (DateOffset ):
1304
1304
"""
1305
1305
Describes 52-53 week fiscal year. This is also known as a 4-4-5 calendar.
1306
1306
@@ -1501,7 +1501,7 @@ def _from_name(cls, *args):
1501
1501
return cls (** cls ._parse_suffix (* args ))
1502
1502
1503
1503
1504
- class FY5253Quarter (CacheableOffset , DateOffset ):
1504
+ class FY5253Quarter (DateOffset ):
1505
1505
"""
1506
1506
DateOffset increments between business quarter dates
1507
1507
for 52-53 week fiscal year (also known as a 4-4-5 calendar).
@@ -1772,7 +1772,7 @@ def _delta_to_nanoseconds(delta):
1772
1772
+ delta .microseconds ) * 1000
1773
1773
1774
1774
1775
- class Day (CacheableOffset , Tick ):
1775
+ class Day (Tick ):
1776
1776
_inc = timedelta (1 )
1777
1777
_prefix = 'D'
1778
1778
0 commit comments