MCPcopy Create free account
hub / github.com/ActiveState/code / next

Method next

recipes/Python/117215_A_Date_module/recipe-117215.py:149–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

147 return self
148
149 def next(self):
150 #Last day of the month.
151 if self.day == NumberDaysMonth(self.month, self.year):
152 self.day = 1
153 #December case.
154 if self.month == 12:
155 self.month = 1
156 self.year += 1
157 else:
158 self.month += 1
159 else:
160 self.day += 1
161
162 #Extended iterator protocol. One can go backwards.
163 def previous(self):

Callers 5

gConFunction · 0.45
gMapFunction · 0.45
sieveFunction · 0.45
recipe-117215.pyFile · 0.45
popitemMethod · 0.45

Calls 1

NumberDaysMonthFunction · 0.85

Tested by

no test coverage detected