Method: calendar.TextCalendar.formatmonth
Calls: 3, Exceptions: 0, Paths: 1Back
Path 1: 3 calls (1.0)
2004 (2) 0 (1)
1 (2) 2 (1)
0 (3)
0 (3)
' January 2004\nMo Tu We Th Fr Sa Su\n 1 2 3 4\n 5 6 7 8 9 10 11\n12 13 14 15 16 17 18\n19 20 21 22 23 24 25\n26 27 28 29 30 31\n' ...
1def formatmonth(self, theyear, themonth, w=0, l=0):
2 """
3 Return a month's calendar string (multi-line).
4 """
5 w = max(2, w)
6 l = max(1, l)
7 s = self.formatmonthname(theyear, themonth, 7 * (w + 1) - 1)
8 s = s.rstrip()
9 s += '\n' * l
10 s += self.formatweekheader(w).rstrip()
11 s += '\n' * l
12 for week in self.monthdays2calendar(theyear, themonth):
13 s += self.formatweek(week, w).rstrip()
14 s += '\n' * l
15 return s