For this assignment, you are to write a JES function called makeCalendar ( ) that will generate the HTML file that will contain the needed code to display a monthly calendar via a web browser.
The calendar for April 2007 would appear as:
Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
---|---|---|---|---|---|---|
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 |
This JES function is to take two integer parameters. The first parameter will indicate which month we wish to display. The second parameter will indicate on which day of the week the first day of the month occurs. For these paratmeter, the months and days are to be represented in the following manner:
Month Values Day Values
- January
- February
- March
- April
- May
- June
- July
- August
- September
- October
- November
- December
- Sunday
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
Thus to print out the above calendar for April, the call would be:
makeCalendar (4, 1)To print out the calendar for the following May, the parameters values would be 5 and 3 since it would start on a Tuesday.
The month value is used for two things:
Your code must be commented and written in good programming style. You are to submit your final program to the digital drop box on the CS 101 Blackboard site.