/* File: calendar.h
 * --------------------------
 * This file contains the function prototypes,
 * include directives, and constant definitions
 * needed to use the following calendar functions.
 */

#include "genlib.h"

#define Sunday     0
#define Monday     1
#define Tuesday    2
#define Wednesday  3
#define Thursday   4
#define Friday     5
#define Saturday   6

/*
 * Function: AddDay
 * Usage: new_week_day = AddDay(old_week_day, n) ;
 * ----------------------------------------------
 * AddDay returns the weekday of the day n days after
 * old_week_day.
 */
int AddDay(int weekday, int inc)  ;

/*
 * Function: PrintOneMonth
 * Usage: PrintOneMonth(weekday, n) ;
 * -----------------------------------
 * PrintOneMonth prints the body of a one-month
 * calendar with n days starting on the given
 * weekday.  No headings are printed.
 */
void PrintOneMonth(int start, int days)  ;

/* 
 * Function: YearDays
 * Usage: ndays = YearDays(year) ;
 * ------------------------------
 * YearDays returns the number of days in the given year.
 */
int YearDays(int year)  ;


/*
 * Function: MonthDays
 * Usage: ndays = MonthDays(month, year);
 * --------------------------------------
 * MonthDays returns the number of days in the indicated
 * month and year.  The year is required to handle leap years.
 */
int MonthDays(int month, int year)  ;

/*
 * Function: MonthName
 * Usage: name = MonthName(month);
 * -------------------------------
 * MonthName converts a numeric month in the range 1-12
 * into the string name for that month.
 */
string MonthName(int month) ;

/*
 * Function: IsLeapYear
 * Usage: if (IsLeapYear(year)) . . .
 * ----------------------------------
 * This function returns TRUE if year is a leap year.
 */
bool IsLeapYear(int year)  ;
