#ifndef _DATE_H_ #define _DATE_H_ #include #include using namespace std; class Date { public: Date( ); Date( int m, int d, int y ); Date( const string & m, int d, int y ); void setDate( int m, int d, int y ); void printDate( ostream & out ) const; bool equals( const Date & rhs ) const; bool lessThan( const Date & rhs ) const; int daysBetween( const Date & rhs ) const; // this date - rhs Date dateAfter( ) const; Date futureDate( int numDays ) const; private: int month; // 1 - 12 int day; // 1 - 31 int year; // 1600 - infinity }; class MonthInfo { public: // Return a string of length three representing // the month (with is 1-12) and vice-versa static string getMonth( int month ); static int getMonth( const string & month ); static int daysInMonth( int month, int year ); private: static bool isLeapYear( int year ); static const string monthArray[ ]; }; #endif