MCPcopy Create free account
hub / github.com/dateutil/dateutil / count

Method count

src/dateutil/rrule.py:198–204  ·  view source on GitHub ↗

Returns the number of recurrences in this set. It will have go through the whole recurrence, if this hasn't been done before.

(self)

Source from the content-addressed store, hash-verified

196
197 # __len__() introduces a large performance penalty.
198 def count(self):
199 """ Returns the number of recurrences in this set. It will have go
200 through the whole recurrence, if this hasn't been done before. """
201 if self._len is None:
202 for x in self:
203 pass
204 return self._len
205
206 def before(self, dt, inc=False):
207 """ Returns the last recurrence before the given datetime instance. The

Callers 13

get_tokenMethod · 0.80
parseMethod · 0.80
testCountMethod · 0.80
testCountZeroMethod · 0.80
testSetCountMethod · 0.80
testSetRRuleCountMethod · 0.80
testSetRDateCountMethod · 0.80
testSetExRuleCountMethod · 0.80
testSetExDateCountMethod · 0.80
test_rrule_roundtripFunction · 0.80
test_rrule_roundtripFunction · 0.80

Calls

no outgoing calls

Tested by 11

testCountMethod · 0.64
testCountZeroMethod · 0.64
testSetCountMethod · 0.64
testSetRRuleCountMethod · 0.64
testSetRDateCountMethod · 0.64
testSetExRuleCountMethod · 0.64
testSetExDateCountMethod · 0.64
test_rrule_roundtripFunction · 0.64
test_rrule_roundtripFunction · 0.64
test_rruleset_roundtripFunction · 0.64