MCPcopy Index your code
hub / github.com/RustPython/RustPython / formatmonth

Method formatmonth

Lib/calendar.py:519–537  ·  view source on GitHub ↗

Return a formatted month as a table.

(self, theyear, themonth, withyear=True)

Source from the content-addressed store, hash-verified

517 self.cssclass_month_head, s)
518
519 def formatmonth(self, theyear, themonth, withyear=True):
520 """
521 Return a formatted month as a table.
522 """
523 v = []
524 a = v.append
525 a('<table border="0" cellpadding="0" cellspacing="0" class="%s">' % (
526 self.cssclass_month))
527 a('\n')
528 a(self.formatmonthname(theyear, themonth, withyear=withyear))
529 a('\n')
530 a(self.formatweekheader())
531 a('\n')
532 for week in self.monthdays2calendar(theyear, themonth):
533 a(self.formatweek(week))
534 a('\n')
535 a('</table>')
536 a('\n')
537 return ''.join(v)
538
539 def formatyear(self, theyear, width=3):
540 """

Callers 2

formatyearMethod · 0.95
mainFunction · 0.95

Calls 6

formatmonthnameMethod · 0.95
formatweekheaderMethod · 0.95
formatweekMethod · 0.95
monthdays2calendarMethod · 0.80
aClass · 0.50
joinMethod · 0.45

Tested by

no test coverage detected