"Datetype.H": #Include #Include #Include #Include
"Datetype.H": #Include #Include #Include #Include
"Datetype.H": #Include #Include #Include #Include
//standard library
using namespace std; //allows the use of cout & endl without 'std::' prefix.
switch (dMonth)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
if (1 <= day && day <= 31)
dDay = day;
else
dDay = 1;
break;
case 4:
case 6:
case 9:
case 11:
if (1 <= day && day <= 30)
dDay = day;
else
dDay = 1;
break;
case 2:
if (isLeapYear())
{
if (1 <= day && day <= 29)
dDay = day;
else
dDay = 1;
}
else
{
if (1 <= day && day <= 28)
dDay = day;
else
dDay = 1;
}
}
}
//constructor
dateType::dateType(int month, int day, int year)
{
setDate(month, day, year);
}
bool dateType::isLeapYear()
{