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

Method formatmonth

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

Return a month's calendar string (multi-line).

(self, theyear, themonth, w=0, l=0)

Source from the content-addressed store, hash-verified

352 print(self.formatmonth(theyear, themonth, w, l), end='')
353
354 def formatmonth(self, theyear, themonth, w=0, l=0):
355 """
356 Return a month's calendar string (multi-line).
357 """
358 w = max(2, w)
359 l = max(1, l)
360 s = self.formatmonthname(theyear, themonth, 7 * (w + 1) - 1)
361 s = s.rstrip()
362 s += '\n' * l
363 s += self.formatweekheader(w).rstrip()
364 s += '\n' * l
365 for week in self.monthdays2calendar(theyear, themonth):
366 s += self.formatweek(week, w).rstrip()
367 s += '\n' * l
368 return s
369
370 def formatyear(self, theyear, w=2, l=1, c=6, m=3):
371 """

Callers 2

prmonthMethod · 0.95
mainFunction · 0.95

Calls 6

formatmonthnameMethod · 0.95
formatweekheaderMethod · 0.95
formatweekMethod · 0.95
maxFunction · 0.85
monthdays2calendarMethod · 0.80
rstripMethod · 0.45

Tested by

no test coverage detected