Create Calendar as text, HTML, List in Python

Modified: | Tags: Python, Date and time

In Python, the calendar module allows you to create calendars in plain text, HTML format, or as lists comprised of either numbers or datetime.date objects.

The calendar module includes convenient functions for determining leap years and obtaining the number of days in a month.

The standard library also has the datetime module that handles dates and times.

All sample code in this article assumes that the calendar module has been imported. It is included in the standard library, so no additional installation is required.

import calendar

Create calendars as plain text

Monthly calendar

You can create a calendar for a specific year and month as a string (str) using calendar.month().

print(calendar.month(2023, 8))
#     August 2023
# Mo Tu We Th Fr Sa Su
#     1  2  3  4  5  6
#  7  8  9 10 11 12 13
# 14 15 16 17 18 19 20
# 21 22 23 24 25 26 27
# 28 29 30 31
# 

print(type(calendar.month(2023, 8)))
# <class 'str'>

You can specify column width with the w argument, and row width with the l argument.

print(calendar.month(2023, 8, w=3, l=2))
#         August 2023
# 
# Mon Tue Wed Thu Fri Sat Sun
# 
#       1   2   3   4   5   6
# 
#   7   8   9  10  11  12  13
# 
#  14  15  16  17  18  19  20
# 
#  21  22  23  24  25  26  27
# 
#  28  29  30  31
# 
# 

calendar.prmonth() prints a similar calendar. Although not shown here, you can specify w and l arguments.

calendar.prmonth(2023, 8)
#     August 2023
# Mo Tu We Th Fr Sa Su
#     1  2  3  4  5  6
#  7  8  9 10 11 12 13
# 14 15 16 17 18 19 20
# 21 22 23 24 25 26 27
# 28 29 30 31

Yearly calendar

You can create a yearly calendar with calendar.calendar(), specifying the year as an argument.

print(calendar.calendar(2023))
#                                   2023
# 
#       January                   February                   March
# Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
#                    1             1  2  3  4  5             1  2  3  4  5
#  2  3  4  5  6  7  8       6  7  8  9 10 11 12       6  7  8  9 10 11 12
#  9 10 11 12 13 14 15      13 14 15 16 17 18 19      13 14 15 16 17 18 19
# 16 17 18 19 20 21 22      20 21 22 23 24 25 26      20 21 22 23 24 25 26
# 23 24 25 26 27 28 29      27 28                     27 28 29 30 31
# 30 31
# 
#        April                      May                       June
# Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
#                 1  2       1  2  3  4  5  6  7                1  2  3  4
#  3  4  5  6  7  8  9       8  9 10 11 12 13 14       5  6  7  8  9 10 11
# 10 11 12 13 14 15 16      15 16 17 18 19 20 21      12 13 14 15 16 17 18
# 17 18 19 20 21 22 23      22 23 24 25 26 27 28      19 20 21 22 23 24 25
# 24 25 26 27 28 29 30      29 30 31                  26 27 28 29 30
# 
#         July                     August                  September
# Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
#                 1  2          1  2  3  4  5  6                   1  2  3
#  3  4  5  6  7  8  9       7  8  9 10 11 12 13       4  5  6  7  8  9 10
# 10 11 12 13 14 15 16      14 15 16 17 18 19 20      11 12 13 14 15 16 17
# 17 18 19 20 21 22 23      21 22 23 24 25 26 27      18 19 20 21 22 23 24
# 24 25 26 27 28 29 30      28 29 30 31               25 26 27 28 29 30
# 31
# 
#       October                   November                  December
# Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su      Mo Tu We Th Fr Sa Su
#                    1             1  2  3  4  5                   1  2  3
#  2  3  4  5  6  7  8       6  7  8  9 10 11 12       4  5  6  7  8  9 10
#  9 10 11 12 13 14 15      13 14 15 16 17 18 19      11 12 13 14 15 16 17
# 16 17 18 19 20 21 22      20 21 22 23 24 25 26      18 19 20 21 22 23 24
# 23 24 25 26 27 28 29      27 28 29 30               25 26 27 28 29 30 31
# 30 31
# 

print(type(calendar.calendar(2023)))
# <class 'str'>

You can customize the calendar layout by specifying the number of months per line with the m argument (default: 3) and the number of spaces between months with the c argument (default: 6).

Although not shown here, you can also specify the width of columns and rows within each month with w and l arguments like calendar.month().

print(calendar.calendar(2023, c=3, m=4))
#                                            2023
# 
#       January                February                March                  April
# Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su
#                    1          1  2  3  4  5          1  2  3  4  5                   1  2
#  2  3  4  5  6  7  8    6  7  8  9 10 11 12    6  7  8  9 10 11 12    3  4  5  6  7  8  9
#  9 10 11 12 13 14 15   13 14 15 16 17 18 19   13 14 15 16 17 18 19   10 11 12 13 14 15 16
# 16 17 18 19 20 21 22   20 21 22 23 24 25 26   20 21 22 23 24 25 26   17 18 19 20 21 22 23
# 23 24 25 26 27 28 29   27 28                  27 28 29 30 31         24 25 26 27 28 29 30
# 30 31
# 
#         May                    June                   July                  August
# Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su
#  1  2  3  4  5  6  7             1  2  3  4                   1  2       1  2  3  4  5  6
#  8  9 10 11 12 13 14    5  6  7  8  9 10 11    3  4  5  6  7  8  9    7  8  9 10 11 12 13
# 15 16 17 18 19 20 21   12 13 14 15 16 17 18   10 11 12 13 14 15 16   14 15 16 17 18 19 20
# 22 23 24 25 26 27 28   19 20 21 22 23 24 25   17 18 19 20 21 22 23   21 22 23 24 25 26 27
# 29 30 31               26 27 28 29 30         24 25 26 27 28 29 30   28 29 30 31
#                                               31
# 
#      September               October                November               December
# Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su   Mo Tu We Th Fr Sa Su
#              1  2  3                      1          1  2  3  4  5                1  2  3
#  4  5  6  7  8  9 10    2  3  4  5  6  7  8    6  7  8  9 10 11 12    4  5  6  7  8  9 10
# 11 12 13 14 15 16 17    9 10 11 12 13 14 15   13 14 15 16 17 18 19   11 12 13 14 15 16 17
# 18 19 20 21 22 23 24   16 17 18 19 20 21 22   20 21 22 23 24 25 26   18 19 20 21 22 23 24
# 25 26 27 28 29 30      23 24 25 26 27 28 29   27 28 29 30            25 26 27 28 29 30 31
#                        30 31
# 

calendar.prcal() prints a similar calendar, and you can customize it using the w, l, c, m arguments. Note that the output is omitted in the sample code provided below.

calendar.prcal(2023)

Set the first day of the week

By default, as in the previous examples, the week starts on Monday.

You can set the first day of the week with calendar.setfirstweekday().

calendar.setfirstweekday(calendar.SUNDAY)

print(calendar.month(2023, 8))
#     August 2023
# Su Mo Tu We Th Fr Sa
#        1  2  3  4  5
#  6  7  8  9 10 11 12
# 13 14 15 16 17 18 19
# 20 21 22 23 24 25 26
# 27 28 29 30 31
# 

calendar.MONDAY is an alias for 0, and calendar.SUNDAY is for 6. You can also specify these as integer values. The current setting can be checked with calendar.firstweekday().

print(calendar.MONDAY)
# 0

print(calendar.SUNDAY)
# 6

calendar.setfirstweekday(0)

print(calendar.month(2023, 8))
#     August 2023
# Mo Tu We Th Fr Sa Su
#     1  2  3  4  5  6
#  7  8  9 10 11 12 13
# 14 15 16 17 18 19 20
# 21 22 23 24 25 26 27
# 28 29 30 31
# 

print(calendar.firstweekday())
# 0

Modify day of the week strings by changing locale

The strings representing the days of the week depend on the locale.

By creating a calendar.LocaleTextCalendar object with a locale, you can use various methods to output the days of the week as strings in that locale. Here is a German example.

ltc_de = calendar.LocaleTextCalendar(locale='de_de')

print(ltc_de.formatmonth(2023, 8))
#     August 2023
# Mo Di Mi Do Fr Sa So
#     1  2  3  4  5  6
#  7  8  9 10 11 12 13
# 14 15 16 17 18 19 20
# 21 22 23 24 25 26 27
# 28 29 30 31
# 

calendar.LocaleTextCalendar offers the following methods. For a monthly calendar, you can specify the w and l arguments. For a yearly calendar, additional c and m arguments are available.

  • formatmonth(): Returns a string representation of the monthly calendar
  • prmonth(): Prints the monthly calendar
  • formatyear(): Returns a string representation of the yearly calendar
  • pryear(): Prints the yearly calendar

Create calendars as HTML table

You can create calendars as HTML strings (str), represented as <table> elements.

Create a calendar.HTMLCalendar object and use various methods.

hc = calendar.HTMLCalendar()

Monthly calendar

Use formatmonth() for a monthly calendar. You can specify whether to display the year in the header with the withyear argument (default: True).

hc = calendar.HTMLCalendar()

print(hc.formatmonth(2023, 8, withyear=False))
# <table border="0" cellpadding="0" cellspacing="0" class="month">
# <tr><th colspan="7" class="month">August</th></tr>
# <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>
# <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>
# <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>
# <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>
# <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>
# <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>
# </table>
# 

print(type(hc.formatmonth(2023, 8)))
# <class 'str'>

Yearly calendar

Use formatyear() for a yearly calendar. You can specify the number of months to display per line with the width argument (default: 3).

The output is omitted here.

hc = calendar.HTMLCalendar()

print(hc.formatyear(2023, width=4))

Set CSS classes

As demonstrated in the previous examples, each day of the week is assigned CSS classes.

These class names are stored in the cssclasses attribute as a list. You can modify them by assigning a new list. Once changed, executing formatmonth() or formatyear() will generate HTML that reflects these updated class names.

hc = calendar.HTMLCalendar()

print(hc.cssclasses)
# ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']

hc.cssclasses = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat blue', 'sun red']

Attributes for CSS classes for months, years, and non-existent days were also added in Python 3.7. These can be changed as well.

print(hc.cssclass_month)
# month

print(hc.cssclass_year)
# year

print(hc.cssclass_noday)
# noday

Set the first day of the week

You can specify the first day of the week with the firstweekday argument of calendar.HTMLCalendar(). Monday is 0 and Sunday is 6.

hc_sun = calendar.HTMLCalendar(firstweekday=6)

print(hc_sun.formatmonth(2023, 8))
# <table border="0" cellpadding="0" cellspacing="0" class="month">
# <tr><th colspan="7" class="month">August 2023</th></tr>
# <tr><th class="sun">Sun</th><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></tr>
# <tr><td class="noday">&nbsp;</td><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></tr>
# <tr><td class="sun">6</td><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></tr>
# <tr><td class="sun">13</td><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></tr>
# <tr><td class="sun">20</td><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></tr>
# <tr><td class="sun">27</td><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></tr>
# </table>
# 

Note that calendar.setfirstweekday() does not apply.

Modify day of the week strings by changing locale

Create a calendar.LocaleHTMLCalendar object to change the locale. The methods are the same as those in the calendar.HTMLCalendar object mentioned above.

lhc = calendar.LocaleHTMLCalendar(firstweekday=6, locale='ja_jp')

print(lhc.formatmonth(2023, 8))
# <table border="0" cellpadding="0" cellspacing="0" class="month">
# <tr><th colspan="7" class="month">8月 2023</th></tr>
# <tr><th class="sun">日</th><th class="mon">月</th><th class="tue">火</th><th class="wed">水</th><th class="thu">木</th><th class="fri">金</th><th class="sat">土</th></tr>
# <tr><td class="noday">&nbsp;</td><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></tr>
# <tr><td class="sun">6</td><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></tr>
# <tr><td class="sun">13</td><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></tr>
# <tr><td class="sun">20</td><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></tr>
# <tr><td class="sun">27</td><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></tr>
# </table>
# 

Create calendars as lists

List of day numbers

You can create a calendar as a two-dimensional list (list of lists) of day numbers using calendar.monthcalendar(). Non-existent days are represented as 0.

Here, the pprint module is used to enhance readability.

import calendar
import pprint

pprint.pprint(calendar.monthcalendar(2023, 8))
# [[0, 1, 2, 3, 4, 5, 6],
#  [7, 8, 9, 10, 11, 12, 13],
#  [14, 15, 16, 17, 18, 19, 20],
#  [21, 22, 23, 24, 25, 26, 27],
#  [28, 29, 30, 31, 0, 0, 0]]

You can specify the first day of the week with calendar.setfirstweekday().

calendar.setfirstweekday(6)

pprint.pprint(calendar.monthcalendar(2023, 8))
# [[0, 0, 1, 2, 3, 4, 5],
#  [6, 7, 8, 9, 10, 11, 12],
#  [13, 14, 15, 16, 17, 18, 19],
#  [20, 21, 22, 23, 24, 25, 26],
#  [27, 28, 29, 30, 31, 0, 0]]

You can generate a similar list by creating a calendar.Calendar object and using its monthdayscalendar() method. You can set the first day of the week using the firstweekday argument in the calendar.Calendar() constructor, with the default being 0 (Monday).

c = calendar.Calendar(firstweekday=6)

pprint.pprint(c.monthdayscalendar(2023, 8))
# [[0, 0, 1, 2, 3, 4, 5],
#  [6, 7, 8, 9, 10, 11, 12],
#  [13, 14, 15, 16, 17, 18, 19],
#  [20, 21, 22, 23, 24, 25, 26],
#  [27, 28, 29, 30, 31, 0, 0]]

c = calendar.Calendar()

pprint.pprint(c.monthdayscalendar(2023, 8))
# [[0, 1, 2, 3, 4, 5, 6],
#  [7, 8, 9, 10, 11, 12, 13],
#  [14, 15, 16, 17, 18, 19, 20],
#  [21, 22, 23, 24, 25, 26, 27],
#  [28, 29, 30, 31, 0, 0, 0]]

You can create the yearly calendar with the yeardayscalendar() method of the calendar.Calendar object. As with plain text and HTML, you can specify the number of months per line with the width argument (default: 3).

Here, the output is abbreviated using pprint, showing each month's list as [...].

pprint.pprint(c.yeardayscalendar(2023), depth=2)
# [[[...], [...], [...]],
#  [[...], [...], [...]],
#  [[...], [...], [...]],
#  [[...], [...], [...]]]

pprint.pprint(c.yeardayscalendar(2023, width=4), depth=2)
# [[[...], [...], [...], [...]],
#  [[...], [...], [...], [...]],
#  [[...], [...], [...], [...]]]

List of tuples

You can create a calendar as a list of (day, day_of_the_week) tuples with the monthdays2calendar() method of calendar.Calendar. Monday is 0 and Sunday is 6.

c = calendar.Calendar()

pprint.pprint(c.monthdays2calendar(2023, 8))
# [[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)],
#  [(7, 0), (8, 1), (9, 2), (10, 3), (11, 4), (12, 5), (13, 6)],
#  [(14, 0), (15, 1), (16, 2), (17, 3), (18, 4), (19, 5), (20, 6)],
#  [(21, 0), (22, 1), (23, 2), (24, 3), (25, 4), (26, 5), (27, 6)],
#  [(28, 0), (29, 1), (30, 2), (31, 3), (0, 4), (0, 5), (0, 6)]]

Use yeardays2calendar() for yearly calendar.

List of datetime.date objects

You can create a calendar as a list of datetime.date objects with the monthdatescalendar() method of calendar.Calendar. The first and last weeks of the month include the dates from the previous and following months.

c = calendar.Calendar()

pprint.pprint(c.monthdatescalendar(2023, 8))
# [[datetime.date(2023, 7, 31),
#   datetime.date(2023, 8, 1),
#   datetime.date(2023, 8, 2),
#   datetime.date(2023, 8, 3),
#   datetime.date(2023, 8, 4),
#   datetime.date(2023, 8, 5),
#   datetime.date(2023, 8, 6)],
#  [datetime.date(2023, 8, 7),
#   datetime.date(2023, 8, 8),
#   datetime.date(2023, 8, 9),
#   datetime.date(2023, 8, 10),
#   datetime.date(2023, 8, 11),
#   datetime.date(2023, 8, 12),
#   datetime.date(2023, 8, 13)],
#  [datetime.date(2023, 8, 14),
#   datetime.date(2023, 8, 15),
#   datetime.date(2023, 8, 16),
#   datetime.date(2023, 8, 17),
#   datetime.date(2023, 8, 18),
#   datetime.date(2023, 8, 19),
#   datetime.date(2023, 8, 20)],
#  [datetime.date(2023, 8, 21),
#   datetime.date(2023, 8, 22),
#   datetime.date(2023, 8, 23),
#   datetime.date(2023, 8, 24),
#   datetime.date(2023, 8, 25),
#   datetime.date(2023, 8, 26),
#   datetime.date(2023, 8, 27)],
#  [datetime.date(2023, 8, 28),
#   datetime.date(2023, 8, 29),
#   datetime.date(2023, 8, 30),
#   datetime.date(2023, 8, 31),
#   datetime.date(2023, 9, 1),
#   datetime.date(2023, 9, 2),
#   datetime.date(2023, 9, 3)]]

For more information on datetime.date, see the following article.

Use yeardatescalendar() for a yearly calendar.

Create calendars as iterators

You can create a calendar as an iterator.

Create a calendar.Calendar object and use various methods. The first day of the week can be set using the firstweekday argument in the calendar.Calendar() constructor, with the default being 0 for Monday.

c = calendar.Calendar()

Iterator of day numbers

itermonthdays() creates an iterator that returns day numbers. Non-existent days are 0. The first and last five days are shown here.

for d in c.itermonthdays(2023, 8):
    print(d)
# 0
# 1
# 2
# 3
# 4
# ...
# 30
# 31
# 0
# 0
# 0

Iterator of tuples

itermonthdays2() creates an iterator that returns (day, day_of_the_week) tuples. Non-existent dates are 0. Monday is 0 and Sunday is 6.

for d in c.itermonthdays2(2023, 8):
    print(d)
# (0, 0)
# (1, 1)
# (2, 2)
# (3, 3)
# (4, 4)
# ...
# (30, 2)
# (31, 3)
# (0, 4)
# (0, 5)
# (0, 6)

itermonthdays3() creates an iterator that returns (year, month, day) tuples. The first and last weeks include values from the previous and next months.

for d in c.itermonthdays3(2023, 8):
    print(d)
# (2023, 7, 31)
# (2023, 8, 1)
# (2023, 8, 2)
# (2023, 8, 3)
# (2023, 8, 4)
# ...
# (2023, 8, 30)
# (2023, 8, 31)
# (2023, 9, 1)
# (2023, 9, 2)
# (2023, 9, 3)

itermonthdays4() creates an iterator that returns (year, month, day, day_of_the_week) tuples. The first and last weeks include values from the previous and next months. Monday is 0 and Sunday is 6.

for d in c.itermonthdays4(2023, 8):
    print(d)
# (2023, 7, 31, 0)
# (2023, 8, 1, 1)
# (2023, 8, 2, 2)
# (2023, 8, 3, 3)
# (2023, 8, 4, 4)
# ...
# (2023, 8, 30, 2)
# (2023, 8, 31, 3)
# (2023, 9, 1, 4)
# (2023, 9, 2, 5)
# (2023, 9, 3, 6)

Iterator of datetime.date objects

itermonthdates() creates an iterator that returns datetime.date objects. The first and last weeks include values from the previous and next months.

for d in c.itermonthdates(2023, 8):
    print(d, type(d))
# 2023-07-31 <class 'datetime.date'>
# 2023-08-01 <class 'datetime.date'>
# 2023-08-02 <class 'datetime.date'>
# 2023-08-03 <class 'datetime.date'>
# 2023-08-04 <class 'datetime.date'>
# ...
# 2023-08-30 <class 'datetime.date'>
# 2023-08-31 <class 'datetime.date'>
# 2023-09-01 <class 'datetime.date'>
# 2023-09-02 <class 'datetime.date'>
# 2023-09-03 <class 'datetime.date'>

Use the calendar module on the command line

The calendar module is also available on the command line.

Use the python (or python3, depending on your environment) command with the -m option to call calendar as a module on the command line.

python3 -m calendar 2023 8
#     August 2023
# Mo Tu We Th Fr Sa Su
#     1  2  3  4  5  6
#  7  8  9 10 11 12 13
# 14 15 16 17 18 19 20
# 21 22 23 24 25 26 27
# 28 29 30 31

Various options are also available.

python3 -m calendar -h
# usage: calendar.py [-h] [-w WIDTH] [-l LINES] [-s SPACING] [-m MONTHS]
#                    [-c CSS] [-L LOCALE] [-e ENCODING] [-t {text,html}]
#                    [year] [month]
# 
# positional arguments:
#   year                  year number (1-9999)
#   month                 month number (1-12, text only)
# 
# options:
#   -h, --help            show this help message and exit
#   -L LOCALE, --locale LOCALE
#                         locale to be used from month and weekday names
#   -e ENCODING, --encoding ENCODING
#                         encoding to use for output
#   -t {text,html}, --type {text,html}
#                         output type (text or html)
# 
# text only arguments:
#   -w WIDTH, --width WIDTH
#                         width of date column (default 2)
#   -l LINES, --lines LINES
#                         number of lines for each week (default 1)
#   -s SPACING, --spacing SPACING
#                         spacing between months (default 6)
#   -m MONTHS, --months MONTHS
#                         months per row (default 3)
# 
# html only arguments:
#   -c CSS, --css CSS     CSS to use for page

Related Categories

Related Articles