Calendar in Python

The module called calendar allows you to output calendars and provides additional useful functions related to the calendar. By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention).


The 4 parameters are 2018,2,1,6. 

2018 is the year , 2 is the width in character of each date and 1 is the number of lines used for a week and 6 is the space between 2 months.


The first day of the week is Monday by default which is given by 0. If you want to change it to Sunday then type the above command. Now the value becomes 6 which stands for Sunday.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by

Up ↑

%d bloggers like this: