int Date::GetLastDayOfMonth() {int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int isLeapYear = 0; if( m_year % 4 == 0 ) {isLeapYear = 1;if( m_year % 100 == 0 ){isLeapYear = 0; if( m_year % 400 == 0 ) isLeapYear = 1; } } days[1] += isLeapYear; return days[m_month-1]; }