#include
using namespace std;
class Date
{
public:
Date(int y=0,int m=0,int d=0)
{
year=y;
month=m;
day=d;
}
void operator=(Date &date);
void output=(){cout<<year<<","<<month<<","<<day<<endl;}
bool operator>(Date d1,Date d2);
private:
int year,month,day;
};
void operator=(Date &date)
{
year=date.year;
month=date.month;
day=date.day;
}
bool operator>(Date d1,Date d2)
{
bool flag=false;
if(d1.year>d2.year)flag=true;
else if(d1.year==d2.year)
if(d1.month>d2.month)flag=true;
else if(d1.month==d2.month)
if(d1.day>d2.day)flag=true;
return flag;
}
void main()
{
Date date1(2017,4,27);
Date date2(2018,4,27),date3;
date3=date1;
cout<<"date3;";
date3.output();
cout<<"date2>date3 is";
cout<<boolalpha<<(date2>date3);