/*******************************************************************
This date class and its related operators have been designed
for general use in C++ projects that require the storage and
comparison of dates.
John Dolan June 2000
******************************************************************/
#include <iostream>
#include <ctype.h>
#ifndef DATE
#define DATE
// a simple class for holding dates
class Date{
public:
Date();
Date(int d,int m,int y);
// outputs the date
friend std::ostream& operator <<(std::ostream& outs, Date d);
//inputs the date
friend std::istream& operator >>(std::istream& ins, Date& d);
/**************************************************
COMPARSION OPERATORS
**************************************************/
friend bool operator > (const Date& d1, const Date& d2);
friend bool operator < (const Date& d1, const Date& d2);
friend bool operator == (const Date& d1, const Date& d2);
friend bool operator != (const Date& d1, const Date& d2);
private:
int day;
int month;
int year;
};
#endif //DATE_H