>>> is_leap_year(2004) True >>> is_leap_year(1900) False
>>> is_valid_date(2, 31, 2013) False >>> is_valid_date(7, 31, 2019) True
>>> get_days_in_month(2, 2008) 29 >>> get_days_in_month(8, 2009) 31
>>> determine_day('07/06/1990') # my birthday Friday >>> determine_day('01/01/2039') Saturday
>>> find_start_day_of_month(12, 1964) # The first day of December in 1964 was the 2nd. 2
>>> find_start_day_of_month_2(12, 1964) # same functionality as find_start_day_of_month(month, year) but faster 2Note: This function does NOT return a value. It just prints a user-friendly visual of the specified month in the command line.
>>> draw_month(7, 1995) July 1995 Sun Mon Tue Wed Thu Fri Sat 1Note: This function does NOT return a value. It just prints a user-friendly visual of the specified year's calendar in the command line.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
>>> draw_year(2009) January 2009 Sun Mon Tue Wed Thu Fri Sat 1 2 34 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 2009 Sun Mon Tue Wed Thu Fri Sat 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
March 2009 Sun Mon Tue Wed Thu Fri Sat 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
April 2009 Sun Mon Tue Wed Thu Fri Sat 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
May 2009 Sun Mon Tue Wed Thu Fri Sat 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
June 2009 Sun Mon Tue Wed Thu Fri Sat 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
July 2009 Sun Mon Tue Wed Thu Fri Sat 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
August 2009 Sun Mon Tue Wed Thu Fri Sat 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
September 2009 Sun Mon Tue Wed Thu Fri Sat 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
October 2009 Sun Mon Tue Wed Thu Fri Sat 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
November 2009 Sun Mon Tue Wed Thu Fri Sat 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
December 2009 Sun Mon Tue Wed Thu Fri Sat 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
"The Gregorian calendar, the current standard calendar in most of the world, adds a 29th day to February in all years evenly divisible by 4, except for centennial years (those ending in -00) which are not evenly divisible by 400. Thus 1600, 2000 and 2400 area leap years but 1700, 1800, 1900, 2200 and 2300 are not." - Roger C.