MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / itermonthdays

Method itermonthdays

tools/python-3.11.9-amd64/Lib/calendar.py:184–194  ·  view source on GitHub ↗

Like itermonthdates(), but will yield day numbers. For days outside the specified month the day number is 0.

(self, year, month)

Source from the content-addressed store, hash-verified

182 yield datetime.date(y, m, d)
183
184 def itermonthdays(self, year, month):
185 """
186 Like itermonthdates(), but will yield day numbers. For days outside
187 the specified month the day number is 0.
188 """
189 day1, ndays = monthrange(year, month)
190 days_before = (day1 - self.firstweekday) % 7
191 yield from repeat(0, days_before)
192 yield from range(1, ndays + 1)
193 days_after = (self.firstweekday - day1 - ndays) % 7
194 yield from repeat(0, days_after)
195
196 def itermonthdays2(self, year, month):
197 """

Callers 2

itermonthdays2Method · 0.95
monthdayscalendarMethod · 0.95

Calls 2

monthrangeFunction · 0.85
repeatFunction · 0.85

Tested by

no test coverage detected