Building a Simple Display Calendar
You'll use the date and time functions you learned in Chapter 8, “Working with Strings, Dates, and Time,” to build a calendar that will display the dates for any month between 1980 and 2010. The user will be able to select both month and year with pull-down menus, and the dates for the selected month will be organized according to the days of the week. We will be working with two variables—one for month and one for year—which the user will supply. These pieces of information will be used to build a timestamp based on the first day of the month defined. If the user input is invalid or absent, the default will be the first day of the current month.
Checking User Input
When the user opens the calendar application ...