#ifndef _CALENDAR_H #define _CALENDAR_H /******** Do NOT modify this file. Write functions in a separate file and include "calendar.h" ********/ /***** Notes: 1. We use this convention for weekdays: 1 = Sunday 2 = Monday 3 = Tuesday 4 = Wednesday 5 = Thursday 6 = Friday 7 = Saturday 2. We use the convention for months: 1 = January 2 = February ... 12 = December *****/ /* January 1, 1900 was a Monday */ #define FirstYear 1900 #define FirstYearWeekday 2 /* Function Prototypes */ /* GetYear() Prompt the user for the calendar year. Make sure that the year is not before FirstYear, otherwise keep bugging the user. */ int GetYear() ; /* WeekdayJan1(int year) Return the day of the week for January 1 for the given year. */ int WeekdayJan1(int year) ; /* PrintLabel(int month, int year) Prints a nice label like "August 2012" centered over the monthly calendar. */ void PrintLabel(int month, int year) ; /* int NumberDays(int month, int year) Return the number of days in the given month. The year parameter is needed for leap years. */ int NumberDays(int month, int year) ; /* PrintMonth(int days, int weekday) Print a monthly calendar for a month that has 'days' days and begins on the given weekday. */ void PrintMonth(int days, int weekday) ; /* int SarahsFunction(int days, int weekday) Return the weekday of the day that is 'days' days after the given weekday. For example, if August starts on a Wednesday, then SarahsFunction(31, 4) will tell you that September starts on Saturday. */ int SarahsFunction(int days, int weekday) ; /* int isLeapYear(int year) Return 1 if the given year is a leap year. Otherwise returns 0. */ int isLeapYear(int year) ; #endif