Python Program for HTMLCalendar formatyearpage() Method with Examples

Calendar Module:

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.

HTMLCalendar formatyearpage() Method:

In Python, the formatyearpage() function is used to obtain the year’s calendar as a complete HTML page.

To generate HTML calendars, class calendar.HTMLCalendar(firstweekday=0) can be used. The formatyearpage() method is one of the HTMLCalendar instance methods.

Syntax:

formatyearpage(year, width=3, css=’calendar.css’, encoding=None)

Parameter Values:

year: This is required. It is a number. It is the year for which the calendar should be created.

width: Specifies the width of the date column. 3 is the default value.

css: This is optional. The name of the CSS that will be used.

encoding: This is optional. It specifies the encoding that should be used for the output.

Return Value: An HTML page for the whole year is returned.

It Depends on the first weekday as specified in the constructor or set by the setfirstweekday() method.

Program for HTMLCalendar formatyearpage() Method with Examples in Python

 

Method #1: Using Built-in Functions (Static Input)

Example1:

Approach:

  • Import calendar module using the import keyword.
  • Give the year as static input and store it in a variable.
  • Call the HTMLCalendar() function by setting firstweekday=0 and store it in another variable.
  • Apply formatyearpage() method to the above text calendar by passing the given year as an argument and store it in another variable.
  • Print the above result.
  • The Exit of the Program.

Below is the implementation:

# Import calendar module using the import keyword.
import calendar
# Give the year as static input and store it in a variable.
gvn_yr = 2015
# Call the HTMLCalendar() function by setting firstweekday=0 and store it in
# another variable.
txt_calndr = calendar.HTMLCalendar(firstweekday=0)
# Apply formatyearpage() method to the above text calendar by passing the given year,
# as an argument and store it in another variable.
rslt = txt_calndr.formatyearpage(gvn_yr)
# Print the above result.
print(rslt)

Output:

b'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
<html>
   \n
   <head>
      \n
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      \n
      <link rel="stylesheet" type="text/css" href="calendar.css" />
      \n
      <title>Calendar for 2015</title>
      \n
   </head>
   \n
   <body>
      \n
      <table border="0" cellpadding="0" cellspacing="0" class="year">
         \n
         <tr>
            <th colspan="3" class="year">2015</th>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">January</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="thu">1</td>
                     <td class="fri">2</td>
                     <td class="sat">3</td>
                     <td class="sun">4</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">5</td>
                     <td class="tue">6</td>
                     <td class="wed">7</td>
                     <td class="thu">8</td>
                     <td class="fri">9</td>
                     <td class="sat">10</td>
                     <td class="sun">11</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">12</td>
                     <td class="tue">13</td>
                     <td class="wed">14</td>
                     <td class="thu">15</td>
                     <td class="fri">16</td>
                     <td class="sat">17</td>
                     <td class="sun">18</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">19</td>
                     <td class="tue">20</td>
                     <td class="wed">21</td>
                     <td class="thu">22</td>
                     <td class="fri">23</td>
                     <td class="sat">24</td>
                     <td class="sun">25</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">26</td>
                     <td class="tue">27</td>
                     <td class="wed">28</td>
                     <td class="thu">29</td>
                     <td class="fri">30</td>
                     <td class="sat">31</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">February</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sun">1</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">2</td>
                     <td class="tue">3</td>
                     <td class="wed">4</td>
                     <td class="thu">5</td>
                     <td class="fri">6</td>
                     <td class="sat">7</td>
                     <td class="sun">8</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">9</td>
                     <td class="tue">10</td>
                     <td class="wed">11</td>
                     <td class="thu">12</td>
                     <td class="fri">13</td>
                     <td class="sat">14</td>
                     <td class="sun">15</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">16</td>
                     <td class="tue">17</td>
                     <td class="wed">18</td>
                     <td class="thu">19</td>
                     <td class="fri">20</td>
                     <td class="sat">21</td>
                     <td class="sun">22</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">23</td>
                     <td class="tue">24</td>
                     <td class="wed">25</td>
                     <td class="thu">26</td>
                     <td class="fri">27</td>
                     <td class="sat">28</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">March</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sun">1</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">2</td>
                     <td class="tue">3</td>
                     <td class="wed">4</td>
                     <td class="thu">5</td>
                     <td class="fri">6</td>
                     <td class="sat">7</td>
                     <td class="sun">8</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">9</td>
                     <td class="tue">10</td>
                     <td class="wed">11</td>
                     <td class="thu">12</td>
                     <td class="fri">13</td>
                     <td class="sat">14</td>
                     <td class="sun">15</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">16</td>
                     <td class="tue">17</td>
                     <td class="wed">18</td>
                     <td class="thu">19</td>
                     <td class="fri">20</td>
                     <td class="sat">21</td>
                     <td class="sun">22</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">23</td>
                     <td class="tue">24</td>
                     <td class="wed">25</td>
                     <td class="thu">26</td>
                     <td class="fri">27</td>
                     <td class="sat">28</td>
                     <td class="sun">29</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">30</td>
                     <td class="tue">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">April</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="wed">29</td>
                     <td class="thu">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">May</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="fri">1</td>
                     <td class="sat">2</td>
                     <td class="sun">3</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">4</td>
                     <td class="tue">5</td>
                     <td class="wed">6</td>
                     <td class="thu">7</td>
                     <td class="fri">8</td>
                     <td class="sat">9</td>
                     <td class="sun">10</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">11</td>
                     <td class="tue">12</td>
                     <td class="wed">13</td>
                     <td class="thu">14</td>
                     <td class="fri">15</td>
                     <td class="sat">16</td>
                     <td class="sun">17</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">18</td>
                     <td class="tue">19</td>
                     <td class="wed">20</td>
                     <td class="thu">21</td>
                     <td class="fri">22</td>
                     <td class="sat">23</td>
                     <td class="sun">24</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">25</td>
                     <td class="tue">26</td>
                     <td class="wed">27</td>
                     <td class="thu">28</td>
                     <td class="fri">29</td>
                     <td class="sat">30</td>
                     <td class="sun">31</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">June</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">1</td>
                     <td class="tue">2</td>
                     <td class="wed">3</td>
                     <td class="thu">4</td>
                     <td class="fri">5</td>
                     <td class="sat">6</td>
                     <td class="sun">7</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">8</td>
                     <td class="tue">9</td>
                     <td class="wed">10</td>
                     <td class="thu">11</td>
                     <td class="fri">12</td>
                     <td class="sat">13</td>
                     <td class="sun">14</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">15</td>
                     <td class="tue">16</td>
                     <td class="wed">17</td>
                     <td class="thu">18</td>
                     <td class="fri">19</td>
                     <td class="sat">20</td>
                     <td class="sun">21</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">22</td>
                     <td class="tue">23</td>
                     <td class="wed">24</td>
                     <td class="thu">25</td>
                     <td class="fri">26</td>
                     <td class="sat">27</td>
                     <td class="sun">28</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">29</td>
                     <td class="tue">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">July</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="wed">29</td>
                     <td class="thu">30</td>
                     <td class="fri">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">August</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sat">1</td>
                     <td class="sun">2</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">3</td>
                     <td class="tue">4</td>
                     <td class="wed">5</td>
                     <td class="thu">6</td>
                     <td class="fri">7</td>
                     <td class="sat">8</td>
                     <td class="sun">9</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">10</td>
                     <td class="tue">11</td>
                     <td class="wed">12</td>
                     <td class="thu">13</td>
                     <td class="fri">14</td>
                     <td class="sat">15</td>
                     <td class="sun">16</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">17</td>
                     <td class="tue">18</td>
                     <td class="wed">19</td>
                     <td class="thu">20</td>
                     <td class="fri">21</td>
                     <td class="sat">22</td>
                     <td class="sun">23</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">24</td>
                     <td class="tue">25</td>
                     <td class="wed">26</td>
                     <td class="thu">27</td>
                     <td class="fri">28</td>
                     <td class="sat">29</td>
                     <td class="sun">30</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">September</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="tue">1</td>
                     <td class="wed">2</td>
                     <td class="thu">3</td>
                     <td class="fri">4</td>
                     <td class="sat">5</td>
                     <td class="sun">6</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">7</td>
                     <td class="tue">8</td>
                     <td class="wed">9</td>
                     <td class="thu">10</td>
                     <td class="fri">11</td>
                     <td class="sat">12</td>
                     <td class="sun">13</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">14</td>
                     <td class="tue">15</td>
                     <td class="wed">16</td>
                     <td class="thu">17</td>
                     <td class="fri">18</td>
                     <td class="sat">19</td>
                     <td class="sun">20</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">21</td>
                     <td class="tue">22</td>
                     <td class="wed">23</td>
                     <td class="thu">24</td>
                     <td class="fri">25</td>
                     <td class="sat">26</td>
                     <td class="sun">27</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">28</td>
                     <td class="tue">29</td>
                     <td class="wed">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">October</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="thu">1</td>
                     <td class="fri">2</td>
                     <td class="sat">3</td>
                     <td class="sun">4</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">5</td>
                     <td class="tue">6</td>
                     <td class="wed">7</td>
                     <td class="thu">8</td>
                     <td class="fri">9</td>
                     <td class="sat">10</td>
                     <td class="sun">11</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">12</td>
                     <td class="tue">13</td>
                     <td class="wed">14</td>
                     <td class="thu">15</td>
                     <td class="fri">16</td>
                     <td class="sat">17</td>
                     <td class="sun">18</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">19</td>
                     <td class="tue">20</td>
                     <td class="wed">21</td>
                     <td class="thu">22</td>
                     <td class="fri">23</td>
                     <td class="sat">24</td>
                     <td class="sun">25</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">26</td>
                     <td class="tue">27</td>
                     <td class="wed">28</td>
                     <td class="thu">29</td>
                     <td class="fri">30</td>
                     <td class="sat">31</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">November</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sun">1</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">2</td>
                     <td class="tue">3</td>
                     <td class="wed">4</td>
                     <td class="thu">5</td>
                     <td class="fri">6</td>
                     <td class="sat">7</td>
                     <td class="sun">8</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">9</td>
                     <td class="tue">10</td>
                     <td class="wed">11</td>
                     <td class="thu">12</td>
                     <td class="fri">13</td>
                     <td class="sat">14</td>
                     <td class="sun">15</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">16</td>
                     <td class="tue">17</td>
                     <td class="wed">18</td>
                     <td class="thu">19</td>
                     <td class="fri">20</td>
                     <td class="sat">21</td>
                     <td class="sun">22</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">23</td>
                     <td class="tue">24</td>
                     <td class="wed">25</td>
                     <td class="thu">26</td>
                     <td class="fri">27</td>
                     <td class="sat">28</td>
                     <td class="sun">29</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">December</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="tue">1</td>
                     <td class="wed">2</td>
                     <td class="thu">3</td>
                     <td class="fri">4</td>
                     <td class="sat">5</td>
                     <td class="sun">6</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">7</td>
                     <td class="tue">8</td>
                     <td class="wed">9</td>
                     <td class="thu">10</td>
                     <td class="fri">11</td>
                     <td class="sat">12</td>
                     <td class="sun">13</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">14</td>
                     <td class="tue">15</td>
                     <td class="wed">16</td>
                     <td class="thu">17</td>
                     <td class="fri">18</td>
                     <td class="sat">19</td>
                     <td class="sun">20</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">21</td>
                     <td class="tue">22</td>
                     <td class="wed">23</td>
                     <td class="thu">24</td>
                     <td class="fri">25</td>
                     <td class="sat">26</td>
                     <td class="sun">27</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">28</td>
                     <td class="tue">29</td>
                     <td class="wed">30</td>
                     <td class="thu">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
      </table>
   </body>
   \n
</html>
\n'

Example2:

Approach:

  • Import calendar module using the import keyword.
  • Give the year as static input and store it in a variable.
  • Give the width as static input and store it in another variable.
  • Call the HTMLCalendar() function by setting firstweekday=0 and store it in another variable.
  • Apply formatyearpage() method to the above text calendar by passing the given year, width and encoding= None as the arguments and store it in another variable.
  • Print the above result.
  • The Exit of the Program.

Below is the implementation:

# Import calendar module using the import keyword.
import calendar
# Give the year as static input and store it in a variable.
gvn_yr = 2017
# Give the width as static input and store it in another variable.
gvn_widt = 4
# Call the HTMLCalendar() function by setting firstweekday=0 and store it in
# another variable.
txt_calndr = calendar.HTMLCalendar(firstweekday=0)
# Apply formatyearpage() method to the above text calendar by passing the given year,
# width and encoding= None as the arguments and store it in another variable.
rslt = txt_calndr.formatyearpage(gvn_yr, gvn_widt, encoding=None)
# Print the above result.
print(rslt)

Output:

b'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
<html>
   \n
   <head>
      \n
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      \n
      <link rel="stylesheet" type="text/css" href="calendar.css" />
      \n
      <title>Calendar for 2017</title>
      \n
   </head>
   \n
   <body>
      \n
      <table border="0" cellpadding="0" cellspacing="0" class="year">
         \n
         <tr>
            <th colspan="4" class="year">2017</th>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">January</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sun">1</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">2</td>
                     <td class="tue">3</td>
                     <td class="wed">4</td>
                     <td class="thu">5</td>
                     <td class="fri">6</td>
                     <td class="sat">7</td>
                     <td class="sun">8</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">9</td>
                     <td class="tue">10</td>
                     <td class="wed">11</td>
                     <td class="thu">12</td>
                     <td class="fri">13</td>
                     <td class="sat">14</td>
                     <td class="sun">15</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">16</td>
                     <td class="tue">17</td>
                     <td class="wed">18</td>
                     <td class="thu">19</td>
                     <td class="fri">20</td>
                     <td class="sat">21</td>
                     <td class="sun">22</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">23</td>
                     <td class="tue">24</td>
                     <td class="wed">25</td>
                     <td class="thu">26</td>
                     <td class="fri">27</td>
                     <td class="sat">28</td>
                     <td class="sun">29</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">30</td>
                     <td class="tue">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">February</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">March</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="wed">29</td>
                     <td class="thu">30</td>
                     <td class="fri">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">April</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sat">1</td>
                     <td class="sun">2</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">3</td>
                     <td class="tue">4</td>
                     <td class="wed">5</td>
                     <td class="thu">6</td>
                     <td class="fri">7</td>
                     <td class="sat">8</td>
                     <td class="sun">9</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">10</td>
                     <td class="tue">11</td>
                     <td class="wed">12</td>
                     <td class="thu">13</td>
                     <td class="fri">14</td>
                     <td class="sat">15</td>
                     <td class="sun">16</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">17</td>
                     <td class="tue">18</td>
                     <td class="wed">19</td>
                     <td class="thu">20</td>
                     <td class="fri">21</td>
                     <td class="sat">22</td>
                     <td class="sun">23</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">24</td>
                     <td class="tue">25</td>
                     <td class="wed">26</td>
                     <td class="thu">27</td>
                     <td class="fri">28</td>
                     <td class="sat">29</td>
                     <td class="sun">30</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">May</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">1</td>
                     <td class="tue">2</td>
                     <td class="wed">3</td>
                     <td class="thu">4</td>
                     <td class="fri">5</td>
                     <td class="sat">6</td>
                     <td class="sun">7</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">8</td>
                     <td class="tue">9</td>
                     <td class="wed">10</td>
                     <td class="thu">11</td>
                     <td class="fri">12</td>
                     <td class="sat">13</td>
                     <td class="sun">14</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">15</td>
                     <td class="tue">16</td>
                     <td class="wed">17</td>
                     <td class="thu">18</td>
                     <td class="fri">19</td>
                     <td class="sat">20</td>
                     <td class="sun">21</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">22</td>
                     <td class="tue">23</td>
                     <td class="wed">24</td>
                     <td class="thu">25</td>
                     <td class="fri">26</td>
                     <td class="sat">27</td>
                     <td class="sun">28</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">29</td>
                     <td class="tue">30</td>
                     <td class="wed">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">June</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="thu">1</td>
                     <td class="fri">2</td>
                     <td class="sat">3</td>
                     <td class="sun">4</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">5</td>
                     <td class="tue">6</td>
                     <td class="wed">7</td>
                     <td class="thu">8</td>
                     <td class="fri">9</td>
                     <td class="sat">10</td>
                     <td class="sun">11</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">12</td>
                     <td class="tue">13</td>
                     <td class="wed">14</td>
                     <td class="thu">15</td>
                     <td class="fri">16</td>
                     <td class="sat">17</td>
                     <td class="sun">18</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">19</td>
                     <td class="tue">20</td>
                     <td class="wed">21</td>
                     <td class="thu">22</td>
                     <td class="fri">23</td>
                     <td class="sat">24</td>
                     <td class="sun">25</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">26</td>
                     <td class="tue">27</td>
                     <td class="wed">28</td>
                     <td class="thu">29</td>
                     <td class="fri">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">July</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sat">1</td>
                     <td class="sun">2</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">3</td>
                     <td class="tue">4</td>
                     <td class="wed">5</td>
                     <td class="thu">6</td>
                     <td class="fri">7</td>
                     <td class="sat">8</td>
                     <td class="sun">9</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">10</td>
                     <td class="tue">11</td>
                     <td class="wed">12</td>
                     <td class="thu">13</td>
                     <td class="fri">14</td>
                     <td class="sat">15</td>
                     <td class="sun">16</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">17</td>
                     <td class="tue">18</td>
                     <td class="wed">19</td>
                     <td class="thu">20</td>
                     <td class="fri">21</td>
                     <td class="sat">22</td>
                     <td class="sun">23</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">24</td>
                     <td class="tue">25</td>
                     <td class="wed">26</td>
                     <td class="thu">27</td>
                     <td class="fri">28</td>
                     <td class="sat">29</td>
                     <td class="sun">30</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">August</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="tue">1</td>
                     <td class="wed">2</td>
                     <td class="thu">3</td>
                     <td class="fri">4</td>
                     <td class="sat">5</td>
                     <td class="sun">6</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">7</td>
                     <td class="tue">8</td>
                     <td class="wed">9</td>
                     <td class="thu">10</td>
                     <td class="fri">11</td>
                     <td class="sat">12</td>
                     <td class="sun">13</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">14</td>
                     <td class="tue">15</td>
                     <td class="wed">16</td>
                     <td class="thu">17</td>
                     <td class="fri">18</td>
                     <td class="sat">19</td>
                     <td class="sun">20</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">21</td>
                     <td class="tue">22</td>
                     <td class="wed">23</td>
                     <td class="thu">24</td>
                     <td class="fri">25</td>
                     <td class="sat">26</td>
                     <td class="sun">27</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">28</td>
                     <td class="tue">29</td>
                     <td class="wed">30</td>
                     <td class="thu">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">September</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="fri">1</td>
                     <td class="sat">2</td>
                     <td class="sun">3</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">4</td>
                     <td class="tue">5</td>
                     <td class="wed">6</td>
                     <td class="thu">7</td>
                     <td class="fri">8</td>
                     <td class="sat">9</td>
                     <td class="sun">10</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">11</td>
                     <td class="tue">12</td>
                     <td class="wed">13</td>
                     <td class="thu">14</td>
                     <td class="fri">15</td>
                     <td class="sat">16</td>
                     <td class="sun">17</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">18</td>
                     <td class="tue">19</td>
                     <td class="wed">20</td>
                     <td class="thu">21</td>
                     <td class="fri">22</td>
                     <td class="sat">23</td>
                     <td class="sun">24</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">25</td>
                     <td class="tue">26</td>
                     <td class="wed">27</td>
                     <td class="thu">28</td>
                     <td class="fri">29</td>
                     <td class="sat">30</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">October</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sun">1</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">2</td>
                     <td class="tue">3</td>
                     <td class="wed">4</td>
                     <td class="thu">5</td>
                     <td class="fri">6</td>
                     <td class="sat">7</td>
                     <td class="sun">8</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">9</td>
                     <td class="tue">10</td>
                     <td class="wed">11</td>
                     <td class="thu">12</td>
                     <td class="fri">13</td>
                     <td class="sat">14</td>
                     <td class="sun">15</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">16</td>
                     <td class="tue">17</td>
                     <td class="wed">18</td>
                     <td class="thu">19</td>
                     <td class="fri">20</td>
                     <td class="sat">21</td>
                     <td class="sun">22</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">23</td>
                     <td class="tue">24</td>
                     <td class="wed">25</td>
                     <td class="thu">26</td>
                     <td class="fri">27</td>
                     <td class="sat">28</td>
                     <td class="sun">29</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">30</td>
                     <td class="tue">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">November</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="wed">29</td>
                     <td class="thu">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">December</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="fri">1</td>
                     <td class="sat">2</td>
                     <td class="sun">3</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">4</td>
                     <td class="tue">5</td>
                     <td class="wed">6</td>
                     <td class="thu">7</td>
                     <td class="fri">8</td>
                     <td class="sat">9</td>
                     <td class="sun">10</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">11</td>
                     <td class="tue">12</td>
                     <td class="wed">13</td>
                     <td class="thu">14</td>
                     <td class="fri">15</td>
                     <td class="sat">16</td>
                     <td class="sun">17</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">18</td>
                     <td class="tue">19</td>
                     <td class="wed">20</td>
                     <td class="thu">21</td>
                     <td class="fri">22</td>
                     <td class="sat">23</td>
                     <td class="sun">24</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">25</td>
                     <td class="tue">26</td>
                     <td class="wed">27</td>
                     <td class="thu">28</td>
                     <td class="fri">29</td>
                     <td class="sat">30</td>
                     <td class="sun">31</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
      </table>
   </body>
   \n
</html>
\n'

Method #2: Using Built-in Functions (User Input)

Example1:

Approach:

  • Import calendar module using the import keyword.
  • Give the year as user input using the int(input()) function and store it in a variable.
  • Call the HTMLCalendar() function by setting firstweekday=0 and store it in another variable.
  • Apply formatyearpage() method to the above text calendar by passing the given year as an argument and store it in another variable.
  • Print the above result.
  • The Exit of the Program.

Below is the implementation:

# Import calendar module using the import keyword.
import calendar
# Give the year as user input using the int(input()) function and store it in a variable.
gvn_yr =  int(input("Enter some random year = "))
# Call the HTMLCalendar() function by setting firstweekday=0 and store it in
# another variable.
txt_calndr = calendar.HTMLCalendar(firstweekday=0)
# Apply formatyearpage() method to the above text calendar by passing the given year,
# as an argument and store it in another variable.
rslt = txt_calndr.formatyearpage(gvn_yr)
# Print the above result.
print(rslt)

Output:

Enter some random year = 2020
b'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
<html>
   \n
   <head>
      \n
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      \n
      <link rel="stylesheet" type="text/css" href="calendar.css" />
      \n
      <title>Calendar for 2020</title>
      \n
   </head>
   \n
   <body>
      \n
      <table border="0" cellpadding="0" cellspacing="0" class="year">
         \n
         <tr>
            <th colspan="3" class="year">2020</th>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">January</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="wed">29</td>
                     <td class="thu">30</td>
                     <td class="fri">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">February</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sat">1</td>
                     <td class="sun">2</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">3</td>
                     <td class="tue">4</td>
                     <td class="wed">5</td>
                     <td class="thu">6</td>
                     <td class="fri">7</td>
                     <td class="sat">8</td>
                     <td class="sun">9</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">10</td>
                     <td class="tue">11</td>
                     <td class="wed">12</td>
                     <td class="thu">13</td>
                     <td class="fri">14</td>
                     <td class="sat">15</td>
                     <td class="sun">16</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">17</td>
                     <td class="tue">18</td>
                     <td class="wed">19</td>
                     <td class="thu">20</td>
                     <td class="fri">21</td>
                     <td class="sat">22</td>
                     <td class="sun">23</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">24</td>
                     <td class="tue">25</td>
                     <td class="wed">26</td>
                     <td class="thu">27</td>
                     <td class="fri">28</td>
                     <td class="sat">29</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">March</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sun">1</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">2</td>
                     <td class="tue">3</td>
                     <td class="wed">4</td>
                     <td class="thu">5</td>
                     <td class="fri">6</td>
                     <td class="sat">7</td>
                     <td class="sun">8</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">9</td>
                     <td class="tue">10</td>
                     <td class="wed">11</td>
                     <td class="thu">12</td>
                     <td class="fri">13</td>
                     <td class="sat">14</td>
                     <td class="sun">15</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">16</td>
                     <td class="tue">17</td>
                     <td class="wed">18</td>
                     <td class="thu">19</td>
                     <td class="fri">20</td>
                     <td class="sat">21</td>
                     <td class="sun">22</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">23</td>
                     <td class="tue">24</td>
                     <td class="wed">25</td>
                     <td class="thu">26</td>
                     <td class="fri">27</td>
                     <td class="sat">28</td>
                     <td class="sun">29</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">30</td>
                     <td class="tue">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">April</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="wed">29</td>
                     <td class="thu">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">May</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="fri">1</td>
                     <td class="sat">2</td>
                     <td class="sun">3</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">4</td>
                     <td class="tue">5</td>
                     <td class="wed">6</td>
                     <td class="thu">7</td>
                     <td class="fri">8</td>
                     <td class="sat">9</td>
                     <td class="sun">10</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">11</td>
                     <td class="tue">12</td>
                     <td class="wed">13</td>
                     <td class="thu">14</td>
                     <td class="fri">15</td>
                     <td class="sat">16</td>
                     <td class="sun">17</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">18</td>
                     <td class="tue">19</td>
                     <td class="wed">20</td>
                     <td class="thu">21</td>
                     <td class="fri">22</td>
                     <td class="sat">23</td>
                     <td class="sun">24</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">25</td>
                     <td class="tue">26</td>
                     <td class="wed">27</td>
                     <td class="thu">28</td>
                     <td class="fri">29</td>
                     <td class="sat">30</td>
                     <td class="sun">31</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">June</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">1</td>
                     <td class="tue">2</td>
                     <td class="wed">3</td>
                     <td class="thu">4</td>
                     <td class="fri">5</td>
                     <td class="sat">6</td>
                     <td class="sun">7</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">8</td>
                     <td class="tue">9</td>
                     <td class="wed">10</td>
                     <td class="thu">11</td>
                     <td class="fri">12</td>
                     <td class="sat">13</td>
                     <td class="sun">14</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">15</td>
                     <td class="tue">16</td>
                     <td class="wed">17</td>
                     <td class="thu">18</td>
                     <td class="fri">19</td>
                     <td class="sat">20</td>
                     <td class="sun">21</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">22</td>
                     <td class="tue">23</td>
                     <td class="wed">24</td>
                     <td class="thu">25</td>
                     <td class="fri">26</td>
                     <td class="sat">27</td>
                     <td class="sun">28</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">29</td>
                     <td class="tue">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">July</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="wed">1</td>
                     <td class="thu">2</td>
                     <td class="fri">3</td>
                     <td class="sat">4</td>
                     <td class="sun">5</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">6</td>
                     <td class="tue">7</td>
                     <td class="wed">8</td>
                     <td class="thu">9</td>
                     <td class="fri">10</td>
                     <td class="sat">11</td>
                     <td class="sun">12</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">13</td>
                     <td class="tue">14</td>
                     <td class="wed">15</td>
                     <td class="thu">16</td>
                     <td class="fri">17</td>
                     <td class="sat">18</td>
                     <td class="sun">19</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">20</td>
                     <td class="tue">21</td>
                     <td class="wed">22</td>
                     <td class="thu">23</td>
                     <td class="fri">24</td>
                     <td class="sat">25</td>
                     <td class="sun">26</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">27</td>
                     <td class="tue">28</td>
                     <td class="wed">29</td>
                     <td class="thu">30</td>
                     <td class="fri">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">August</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sat">1</td>
                     <td class="sun">2</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">3</td>
                     <td class="tue">4</td>
                     <td class="wed">5</td>
                     <td class="thu">6</td>
                     <td class="fri">7</td>
                     <td class="sat">8</td>
                     <td class="sun">9</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">10</td>
                     <td class="tue">11</td>
                     <td class="wed">12</td>
                     <td class="thu">13</td>
                     <td class="fri">14</td>
                     <td class="sat">15</td>
                     <td class="sun">16</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">17</td>
                     <td class="tue">18</td>
                     <td class="wed">19</td>
                     <td class="thu">20</td>
                     <td class="fri">21</td>
                     <td class="sat">22</td>
                     <td class="sun">23</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">24</td>
                     <td class="tue">25</td>
                     <td class="wed">26</td>
                     <td class="thu">27</td>
                     <td class="fri">28</td>
                     <td class="sat">29</td>
                     <td class="sun">30</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">September</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="tue">1</td>
                     <td class="wed">2</td>
                     <td class="thu">3</td>
                     <td class="fri">4</td>
                     <td class="sat">5</td>
                     <td class="sun">6</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">7</td>
                     <td class="tue">8</td>
                     <td class="wed">9</td>
                     <td class="thu">10</td>
                     <td class="fri">11</td>
                     <td class="sat">12</td>
                     <td class="sun">13</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">14</td>
                     <td class="tue">15</td>
                     <td class="wed">16</td>
                     <td class="thu">17</td>
                     <td class="fri">18</td>
                     <td class="sat">19</td>
                     <td class="sun">20</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">21</td>
                     <td class="tue">22</td>
                     <td class="wed">23</td>
                     <td class="thu">24</td>
                     <td class="fri">25</td>
                     <td class="sat">26</td>
                     <td class="sun">27</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">28</td>
                     <td class="tue">29</td>
                     <td class="wed">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
         <tr>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">October</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="thu">1</td>
                     <td class="fri">2</td>
                     <td class="sat">3</td>
                     <td class="sun">4</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">5</td>
                     <td class="tue">6</td>
                     <td class="wed">7</td>
                     <td class="thu">8</td>
                     <td class="fri">9</td>
                     <td class="sat">10</td>
                     <td class="sun">11</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">12</td>
                     <td class="tue">13</td>
                     <td class="wed">14</td>
                     <td class="thu">15</td>
                     <td class="fri">16</td>
                     <td class="sat">17</td>
                     <td class="sun">18</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">19</td>
                     <td class="tue">20</td>
                     <td class="wed">21</td>
                     <td class="thu">22</td>
                     <td class="fri">23</td>
                     <td class="sat">24</td>
                     <td class="sun">25</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">26</td>
                     <td class="tue">27</td>
                     <td class="wed">28</td>
                     <td class="thu">29</td>
                     <td class="fri">30</td>
                     <td class="sat">31</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">November</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="sun">1</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">2</td>
                     <td class="tue">3</td>
                     <td class="wed">4</td>
                     <td class="thu">5</td>
                     <td class="fri">6</td>
                     <td class="sat">7</td>
                     <td class="sun">8</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">9</td>
                     <td class="tue">10</td>
                     <td class="wed">11</td>
                     <td class="thu">12</td>
                     <td class="fri">13</td>
                     <td class="sat">14</td>
                     <td class="sun">15</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">16</td>
                     <td class="tue">17</td>
                     <td class="wed">18</td>
                     <td class="thu">19</td>
                     <td class="fri">20</td>
                     <td class="sat">21</td>
                     <td class="sun">22</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">23</td>
                     <td class="tue">24</td>
                     <td class="wed">25</td>
                     <td class="thu">26</td>
                     <td class="fri">27</td>
                     <td class="sat">28</td>
                     <td class="sun">29</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">30</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
            <td>
               <table border="0" cellpadding="0" cellspacing="0" class="month">
                  \n
                  <tr>
                     <th colspan="7" class="month">December</th>
                  </tr>
                  \n
                  <tr>
                     <th class="mon">Mon</th>
                     <th class="tue">Tue</th>
                     <th class="wed">Wed</th>
                     <th class="thu">Thu</th>
                     <th class="fri">Fri</th>
                     <th class="sat">Sat</th>
                     <th class="sun">Sun</th>
                  </tr>
                  \n
                  <tr>
                     <td class="noday">&nbsp;</td>
                     <td class="tue">1</td>
                     <td class="wed">2</td>
                     <td class="thu">3</td>
                     <td class="fri">4</td>
                     <td class="sat">5</td>
                     <td class="sun">6</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">7</td>
                     <td class="tue">8</td>
                     <td class="wed">9</td>
                     <td class="thu">10</td>
                     <td class="fri">11</td>
                     <td class="sat">12</td>
                     <td class="sun">13</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">14</td>
                     <td class="tue">15</td>
                     <td class="wed">16</td>
                     <td class="thu">17</td>
                     <td class="fri">18</td>
                     <td class="sat">19</td>
                     <td class="sun">20</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">21</td>
                     <td class="tue">22</td>
                     <td class="wed">23</td>
                     <td class="thu">24</td>
                     <td class="fri">25</td>
                     <td class="sat">26</td>
                     <td class="sun">27</td>
                  </tr>
                  \n
                  <tr>
                     <td class="mon">28</td>
                     <td class="tue">29</td>
                     <td class="wed">30</td>
                     <td class="thu">31</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                     <td class="noday">&nbsp;</td>
                  </tr>
                  \n
               </table>
               \n
            </td>
         </tr>
      </table>
   </body>
   \n
</html>
\n'