This post contains a total of 8+ Python Calendar Program Examples with Source Code. All these Calendar Programs are made using Python Language.
You can use the source code of these examples with credits to the original owner.
Related Posts
Python Calendar Programs
1. 4 lines of code Calendar 2017
Made by Leigh E. O. Source
~~~~~~~ CHALLENGE ACCEPTED! ~~~~~~~ ___________________________________ January 2017 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 February 2017 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 ...
import calendar
date=[2017,1]; intro = print("~"*7,"CHALLENGE ACCEPTED!", "~"*7, "\n","_"*35)
while date[1] <= 12:
print(calendar.month(date[0],date[1],4,2)); date[1] += 1
2. 2019 Calendar
Made by Malkiat Singh. Source
My 2019 Calendar 2019 A year of change in all Aspects of life 2019 January February Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa 1 2 3 4 5 1 2 6 7 8 9 10 11 12 3 4 5 6 7 8 9 13 14 15 16 17 18 19 10 11 12 13 14 15 16 20 21 22 23 24 25 26 17 18 19 20 21 22 23 27 28 29 30 31 24 25 26 27 28 March April Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa 1 2 1 2 3 4 5 6 3 4 5 6 7 8 9 7 8 9 10 11 12 13 10 11 12 13 14 15 16 14 15 16 17 18 19 20 17 18 19 20 21 22 23 21 22 23 24 25 26 27 24 25 26 27 28 29 30 28 29 30 ....
'''
The entire 2019 calendar, and a few other aspects, with minimal
lines of code!
.............. '''
import calendar
calendar.setfirstweekday(calendar.SUNDAY)
print('''My 2019 Calendar
''')
print('2019 A year of change in all Aspects of life')
calendar.prcal(2019, 2, 1, 3, 2)
# the 2 1 3 represent the number of spaces between the dates, weeks & months: 2 represents the number of months per raw.
3. CALENDAR USING PYTHON
Made by Eren. Source
input the year : 2000 input the month : 11 November 2000 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
import calendar
y = int(input ("input the year : "))
m = int(input("input the month : "))
print (calendar.month(y,m))
4. Calendar by Louis
Made by Louis. Source
January 2022 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 February 2022 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 ....
import calendar
from datetime import date
this_year=(date.today().timetuple().tm_year)
for month in range(1,13):
print(calendar.month(this_year, month))
5. Calendar by AZIZ SOBIROV
Made by AZIZ SOBIROV. Source
September 2022 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
import calendar
import datetime
import os
current = datetime.datetime.now()
year = current.year
month = current.month
print("<h3 style='height:250px;width:100%;display:flex;align-items:center;justify-content:center;color:#000;background:linear-gradient(to bottom,#fff,#eaebed);border-radius:10px;'>"+calendar.month(year,month)+"</h3>")
print("<h3 align='center' style='color:#00adff; -webkit-box-reflect:below 5px linear-gradient(transparent, #000);'>Created by Aziz Sobirov.</h3>")
os.system("touch file.png")
6. calendar 2021 may
Made by Manas Sahu. Source
May 2021 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
import calendar
year=2021
month=5
print(calendar.month(year,month))
7. Calendar by Suryansh Gupta
Made by Suryansh Gupta. Source
January 2021 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 February 2021 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 ....
"""import calendar
year = 2021
month = 7
print(calendar.month(year,month))"""
import calendar
year = 2021
month = 0
for x in range(1,13):
if x<=12:
month+=1
print(calendar.month(year,month))
8. 2017 All Months Calendar in Python
Made by Makena. Source
January 2017 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 February 2017 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 ....
import calendar
yy1=2017
mm1=1
print(calendar.month(yy1,mm1))
yy2 = 2017
mm2 = 2
print(calendar.month(yy2,mm2))
yy3= 2017
mm3= 3
print(calendar.month(yy3,mm3))
yy4 = 2017
mm4 = 4
print(calendar.month(yy4,mm4))
yy5 = 2017
mm5 = 5
print(calendar.month(yy5,mm5))
yy6 = 2017
mm6 = 6
print(calendar.month(yy6,mm6))
yy7 = 2017
mm7 = 7
print(calendar.month(yy7,mm7))
yy8 = 2017
mm8 = 8
print(calendar.month(yy8,mm8))
yy9 = 2017
mm9 = 9
print(calendar.month(yy9,mm9))
yy10 = 2017
mm10 = 10
print(calendar.month(yy10,mm10))
yy11 = 2017
mm11 = 11
print(calendar.month(yy11,mm11))
yy12 = 2017
mm12 = 12
print(calendar.month(yy12,mm12))
9. Check Calendar Any year
Made by Tanmay Gupta. Source
The calendar of year: 2001 January 2001 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 February 2001 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 ....
import calendar
year = int(input())
print("The calendar of year:",year)
print("\n")
if year<1000 or year>9999:
print("Please input correct year!!")
else:
for i in range (12):
print(calendar.month(year,i+1))