@@ -275,7 +275,7 @@ def yesterday(cls, tz=None):
275275
276276 :rtype: Pendulum
277277 """
278- return cls .today (tz ).sub (days = 1 )
278+ return cls .today (tz ).subtract (days = 1 )
279279
280280 @classmethod
281281 def _create_datetime (cls , tz , year = None , month = None , day = None ,
@@ -1400,7 +1400,7 @@ def add(self, years=0, months=0, weeks=0, days=0,
14001400
14011401 return self .instance (self ._datetime + delta )
14021402
1403- def sub (self , years = 0 , months = 0 , weeks = 0 , days = 0 ,
1403+ def subtract (self , years = 0 , months = 0 , weeks = 0 , days = 0 ,
14041404 hours = 0 , minutes = 0 , seconds = 0 , microseconds = 0 ,
14051405 weekdays = None ):
14061406 """
@@ -1452,7 +1452,7 @@ def add_timedelta(self, delta):
14521452 return self .add (days = delta .days , seconds = delta .seconds ,
14531453 microseconds = delta .microseconds )
14541454
1455- def sub_timedelta (self , delta ):
1455+ def subtract_timedelta (self , delta ):
14561456 """
14571457 Remove timedelta duration from the instance.
14581458
@@ -1461,8 +1461,8 @@ def sub_timedelta(self, delta):
14611461
14621462 :rtype: Pendulum
14631463 """
1464- return self .sub (days = delta .days , seconds = delta .seconds ,
1465- microseconds = delta .microseconds )
1464+ return self .subtract (days = delta .days , seconds = delta .seconds ,
1465+ microseconds = delta .microseconds )
14661466
14671467 # DIFFERENCES
14681468
@@ -1795,9 +1795,9 @@ def previous(self, day_of_week=None):
17951795 if day_of_week is None :
17961796 day_of_week = self .day_of_week
17971797
1798- dt = self .start_of ('day' ).sub (days = 1 )
1798+ dt = self .start_of ('day' ).subtract (days = 1 )
17991799 while dt .day_of_week != day_of_week :
1800- dt = dt .sub (days = 1 )
1800+ dt = dt .subtract (days = 1 )
18011801
18021802 return dt
18031803
@@ -2122,7 +2122,7 @@ def for_json(self):
21222122
21232123 def __sub__ (self , other ):
21242124 if isinstance (other , datetime .timedelta ):
2125- return self .sub_timedelta (other )
2125+ return self .subtract_timedelta (other )
21262126
21272127 return self ._get_datetime (other , True ).diff (self , False )
21282128
0 commit comments