{"id":26006,"date":"2021-12-07T18:06:45","date_gmt":"2021-12-07T12:36:45","guid":{"rendered":"https:\/\/python-programs.com\/?p=26006"},"modified":"2021-12-08T20:40:38","modified_gmt":"2021-12-08T15:10:38","slug":"python-program-for-calendar-prmonth-method-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-calendar-prmonth-method-with-examples\/","title":{"rendered":"Python Program for calendar prmonth() Method with Examples"},"content":{"rendered":"

Calendar Module:<\/strong><\/p>\n

The calendar module allows you to output calendars like a program and includes extra calendar-related operations. Calendar module functions and classes make use of an idealized calendar, the current Gregorian calendar extended in both directions indefinitely.<\/p>\n

prmonth() Method:<\/strong><\/p>\n

The prmonth() method is used to print the month’s calendar.<\/p>\n

To generate plain text calendars, class calendar.TextCalendar(firstweekday=0) can be used.The prmonth() method is one of the TextCalendar instance’s methods.<\/p>\n

Syntax:<\/strong><\/p>\n

prmonth(year, month, width=0, lines=0)<\/pre>\n

Parameter Values:<\/strong><\/p>\n

year:<\/strong> This is required. It is a number. It is the year for which the calendar should be created.<\/p>\n

month:<\/strong> This is required. It is a number. It is the month for which the calendar should be created.<\/p>\n

width:<\/strong> This is Optional. It is a number. The distance between two columns in width. The default value is zero.<\/p>\n

lines:<\/strong> This is Optional. It is a number. A blank line separating\u00a0two rows. The default value is zero.<\/p>\n

Return Value: <\/strong>A month\u2019s calendar is returned.<\/p>\n

Program for calendar prmonth() Method with Examples in Python<\/h2>\n